This version of ChromeDriver only supports Chrome version 93 Current browser version is 95.0.4638.54

Posted Alex Hub

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了This version of ChromeDriver only supports Chrome version 93 Current browser version is 95.0.4638.54相关的知识,希望对你有一定的参考价值。

还是那个超星每日健康自动报备,今天又报错了,撅了。

Error Message

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

Solution

出现这个报错是因为Google Chrome和驱动程序的版本不统一,也就是chromedriver.exe,最好是更新驱动程序,但是浏览器是一直更新的,那我总不能每次更新完浏览器之后都更新一下这个项目的驱动程序吧,那多麻烦,搜了一下,决定使用ChromeDriverManager

首先安装一个包:

pip install webdriver-manager

然后修改一下代码:

bro = webdriver.Chrome(executable_path=r'./chromedriver.exe', options=chrome_options)  # 实例化对象
# 由上改为下
bro = webdriver.Chrome(ChromeDriverManager(path="./").install(), options=chrome_options)  # 实例化对象

以上是关于This version of ChromeDriver only supports Chrome version 93 Current browser version is 95.0.4638.54的主要内容,如果未能解决你的问题,请参考以下文章

GoLand调试报错:Version of Delve is too old for this version of Go...

This version of CLI is only compatible with Angular versions

预览安卓xml布局文件提示 This version of the rendering library is more recent than your version of ADT plug-

This version of ChromeDriver only supports Chrome version 93 Current browser version is 95.0.4638.54

Module use of python37.dll conflicts with this version of Python.

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd