chrome版本117驅(qū)動下載路,解決版本不匹配問題
執(zhí)行selenium代碼報錯
from selenium import webdriver
driver = webdriver.Chrome()
原因
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 117.0.5938.89 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
非常簡單的報錯,相信大家都會
chrome的地址欄輸入chrome://version,自然就得到117.0.5938.89
于是去下載站找對應(yīng)的驅(qū)動
比如https://googlechromelabs.github.io/chrome-for-testing/
但得到的最新版本是114.0.5735.90/
實(shí)際也是上面代碼關(guān)聯(lián)的驅(qū)動版本,這就有點(diǎn)傻眼了。
解決
國內(nèi)的鏡像是定時同步國外的,先看源頭
chromedriver官網(wǎng):ChromeDriver - WebDriver for Chrome
下載頁:ChromeDriver - WebDriver for Chrome - Downloads
官網(wǎng)最新也是114.0.5735.90/
但這里有這么一句

繼續(xù)追溯https://googlechromelabs.github.io/chrome-for-testing/
看到這樣一句

找到第一個鏈接the Chrome for Testing (CfT) availability dashboard.
對應(yīng)地址:https://googlechromelabs.github.io/chrome-for-testing/
能看到如下信息,是的,新的驅(qū)動有win64版本了

作者: 千里和他的軟件測試
軟件測試學(xué)習(xí)交流: 軟件測試交流群 172489141
銀行金融業(yè)務(wù)交流: 軟件測試學(xué)習(xí)交流群 52304542
接口自動化性能交流: 一個正經(jīng)的測試群 188427938

浙公網(wǎng)安備 33010602011771號