Pythonerror:this version 的chromedriver只支持chrome版本83

cfh9epnr  于 2021-07-14  发布在  Java
关注(0)|答案(2)|浏览(425)

chrome://inspect/#devices 在chrome浏览器中显示:
m2010j19sc#44DDF447012型
com.tencent.mm(77.0.3865.120)trace中的webview
当我跑的时候

driver.switch_to.context('WEBVIEW_com.tencent.mm:tools')

应用程序运行失败:
selenium.common.exceptions.webdriverexception:消息:处理命令时发生未知服务器端错误。原始错误:无法创建新会话。详细信息:未创建会话:此版本的chromedriver仅支持chrome版本83。
我的google chrome版本:版本90.0.4430.93(64位)
应用日志:

[debug] [35m[Chromedriver][39m The most recent known Chrome version: 86.0.4240
[debug] [35m[Chromedriver][39m Found 6 executables in 'C:\Users\LinHai\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win'[debug] [35m[Chromedriver][39m The following Chromedriver executables were found:
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver-原始.exe' (version '86.0.4240.22', minimum Chrome version '86.0.4240')
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver_win32_v83.0.4103.39.exe' (version '83.0.4103.39', minimum Chrome version '83.0.4103')
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver.exe' (version '83.0.4103.39', minimum Chrome version '83.0.4103')
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver_win32_v83.0.4103.14.exe' (version '83.0.4103.14', minimum Chrome version '83.0.0')
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver_win32_v2.44.exe' (version '2.44', minimum Chrome version '69.0.3497')
[debug] [35m[Chromedriver][39m     'C:/Users/LinHai/AppData/Local/Programs/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver_win32_v2.43.exe' (version '2.43', minimum Chrome version '69.0.3497')

我试着改变
c:/users/linhai/appdata/local/programs/appium/resources/app/node\u modules/appium/node\u modules/appium chromedriver/chromedriver/win/chromedriver.exe的chromedriver.exe到以下版本:
77.0.3865.40
83.0.4103.39
86.0.4240.22
90.0.4430.24
仍然返回“此版本的chromedriver仅支持chrome版本83”错误
我必须把chrome版本降到83吗?

k97glaaz

k97glaaz1#

只需更新你的chromedriver-https://chromedriver.chromium.org/downloads

rqqzpn5f

rqqzpn5f2#

使用webdriver管理器自动更新驱动程序:

pip install webdriver-manager

要安装/更新chromedriver:

from webdriver_manager.chrome import ChromeDriverManager

custom_path = '/home/user/drivers/chromedriver'
ChromeDriverManager(path=custom_path).install()

相关问题