2022-02-21|閱讀時間 ‧ 約 2 分鐘

Selenium執行chrome driver視窗消失

執行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的版本放到程式資料夾中即可
分享至
成為作者繼續創作的動力吧!
© 2024 vocus All rights reserved.