成功解决BUG:Message: session not created: This version of ChromeDriver only supports Chrome version 94

成功解决BUG:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 114.0.5735.199 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

异常解读

在使用 Python 操作 selenium 的时候,会出现如下错误:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 114.0.5735.199 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

该错误翻译为中文是:

chromedriver.exe 版本不对。

实际编码错误如下图所示。

成功解决BUG:Message: session not created: This version of ChromeDriver only supports Chrome version 94

解决思路

这个BUG是由于Chrome驱动程序(chromedriver)版本过低导致的BUG,我们可以去对应网址寻找指定 chromedriver 版本。

下载地址:https://registry.npmmirror.com/binary.html?path=chromedriver/

下载前在查看一下本地 Chrome 版本。

成功解决BUG:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 114.0.5735.199 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
接下来找对与你本地版本对应的驱动即可
成功解决BUG:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 114.0.5735.199 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

其他学习资料

猜你喜欢

转载自blog.csdn.net/hihell/article/details/131690844