无法在连接到chrome本地主机:xxxx来自未创建会话:使用Python的Robot框架时,Chrome版本必须>=69.0.3497.0

2024-09-24 00:30:34 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图通过ChromeWeb驱动程序连接到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版本没有问题,因为相同的是工作良好不同的创建驱动程序代码。在

工作驾驶员代码:

^{pr2}$

发布驱动程序代码:

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

系统详细信息

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

Tags: 代码版本localhostmessagewindows系统错误驱动程序
1条回答
网友
1楼 · 发布于 2024-09-24 00:30:34

此错误消息。。。在

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,它理想地支持Chrome版本之间的69.x到71.x

解决方案

根据最佳实践:


更新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

相关问题 更多 >