Selenium執行chrome driver視窗消失

2022/02/21閱讀時間約 1 分鐘
執行driver = webdriver.Chrome()時 視窗即時消失並出現以下錯誤
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 98.0.4758.102 with binary path X:xx

1.Chrome version 93的93依照每個人chromedriver而有不同
2.path X:xx 通常為C:\Program Files\Google\Chrome\Application\chrome.exe
單純只是因為電腦的chrome更新了 但程式執行的chromedriver版本太舊
只要到https://chromedriver.chromium.org/downloads
下載相對應的版本即可 例如本文中98.0.4758.102就下載98.0.4758.102的版本放到程式資料夾中即可
為什麼會看到廣告
H
H
留言0
查看全部
發表第一個留言支持創作者!