chrome版本117驱动下载路,解决版本不匹配问题

发布时间 2023-09-18 08:26:16作者: laoluoits

执行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

于是去下载站找对应的驱动

比如https://registry.npmmirror.com/binary.html?path=chromedriver/

但得到的最新版本是114.0.5735.90/

实际也是上面代码关联的驱动版本,这就有点傻眼了。

解决
国内的镜像是定时同步国外的,先看源头

chromedriver官网:ChromeDriver - WebDriver for Chrome

下载页:ChromeDriver - WebDriver for Chrome - Downloads

官网最新也是114.0.5735.90/

但这里有这么一句

 

继续追溯https://chromedriver.chromium.org/downloads/version-selection

看到这样一句

 

找到第一个链接the Chrome for Testing (CfT) availability dashboard.

对应地址https://googlechromelabs.github.io/chrome-for-testing/

能看到如下信息,是的,新的驱动有win64版本了