python - 无法使用 Python 通过 Robot Framework 连接到 localhost :xxxx from session not created: Chrome version must be >= 69. 0.3497.0 上的 chrome

标签 python selenium google-chrome selenium-chromedriver robotframework

当我尝试通过 Chrome Web 驱动程序连接到 debuggerAddress 时,出现以下错误

WebDriverException: Message: unknown error: cannot connect to chrome at localhost:xxxx from session not created: Chrome version must be >= 69.0.3497.0  (Driver info: chromedriver=2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90),platform=Windows NT 6.1.7601 SP1 x86_64)

chromedriver-Chrome 版本没有问题,因为相同的工作正常,不同的创建驱动程序代码。

工作驱动程序代码:

Create Webdriver    Chrome    executable_path=C:/WebDrivers/chromedriver.exe

问题驱动程序代码:

Create Webdriver    Remote    command_executor=http://localhost:yyyy    desired_capabilities=${chrome_cap}

系统详细信息

  • Chrome 版本:70
  • Chrome 驱动程序版本:2.44
  • 系统:Windows 7(64 位)

最佳答案

此错误消息...

WebDriverException: Message: unknown error: cannot connect to chrome at localhost:xxxx from session not created: Chrome version must be >= 69.0.3497.0 (Driver info: chromedriver=2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90)

...暗示 Chrome 版本必须 >= 69.0

您的主要问题是您正在使用的二进制文件之间的版本兼容性,如下所示:

  • 您使用的 chromedriver=2.44 最好支持 69.x 到 71.x 之间的 Chrome 版本
<小时/>

解决方案

根据最佳实践:

<小时/>

更新A

根据您的评论更新,如果您无权升级 Chrome,并且需要使用 Chrome v70,则必须按照以下说明下载匹配的 ChromeDriver 版本讨论中的详细信息RemoteDisconnected(“Remote end closed connection without” http.client.RemoteDisconnected: Remote end closed connection without response

<小时/>

更新B

根据您的评论,通过提及安装路径来更新使用特定版本的 Chrome 二进制文件,您可以按照讨论 Cannot find Chrome binary with Selenium in Python for older versions of Google Chrome 进行操作。

关于python - 无法使用 Python 通过 Robot Framework 连接到 localhost :xxxx from session not created: Chrome version must be >= 69. 0.3497.0 上的 chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53954295/

相关文章:

linux - Flask、Nginx、Gunicorn Stack 启动 Selenium 实例

python - 为什么尝试使用 selenium 单击会出现 "ElementNotInteractableException"?

c# - 如何基于Selenium搭建可靠的并行浏览器环境

Javascript Chrome 确认框延迟

python - Django 发送带有链接的电子邮件

python - 列表中此列表中的 [1] 的用途是什么?

python - 将 cron 脚本输出重定向到主目录中的文件

java - 有没有办法先在主窗口上搜索 webelement,如果找不到,然后开始在 iframe 内搜索?

javascript - Chrome "onclick"事件问题

python - 为什么我的脚本在调用 .EXE 后停止执行命令?