我已经从https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.182/win64/chromedriver-win64.zip下载了chrome驱动程序126.0.6478.182并将其放置在C中的python文件夹中驱动器并在环境变量中提到路径。 我还从https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.182/win64/chrome-win64.zip下载了用于测试的匹配chrome浏览器126.0.6478.182。我不确定如何使用此版本的 chrome 进行自动化测试。当我运行此命令时,它会打开最新版本的浏览器,并在一分钟后失败。
出现以下错误:
WebDriverException: Message: disconnected: unable to send message to renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.69)
Stacktrace:
GetHandleVerifier [0x00007FF6E73C2775+28773]
(No symbol) [0x00007FF6E732AFB0]
(No symbol) [0x00007FF6E71C552A]
(No symbol) [0x00007FF6E71B269C]
(No symbol) [0x00007FF6E71B260C]
(No symbol) [0x00007FF6E71B0CF8]
(No symbol) [0x00007FF6E71B1BE7]
(No symbol) [0x00007FF6E71D2DA8]
(No symbol) [0x00007FF6E72580B3]
(No symbol) [0x00007FF6E721296A]
(No symbol) [0x00007FF6E7210B8D]
(No symbol) [0x00007FF6E723EF9A]
(No symbol) [0x00007FF6E720C1C6]
(No symbol) [0x00007FF6E723F1B0]
(No symbol) [0x00007FF6E725F1A4]
(No symbol) [0x00007FF6E723ED43]
(No symbol) [0x00007FF6E720A548]
(No symbol) [0x00007FF6E720B6B1]
GetHandleVerifier [0x00007FF6E76EF45D+3358029]
GetHandleVerifier [0x00007FF6E770430D+3443709]
GetHandleVerifier [0x00007FF6E76F83FD+3394797]
GetHandleVerifier [0x00007FF6E748929B+842635]
(No symbol) [0x00007FF6E733654F]
(No symbol) [0x00007FF6E7331FA4]
(No symbol) [0x00007FF6E733213D]
(No symbol) [0x00007FF6E7321629]
BaseThreadInitThunk [0x00007FFCA3F14CB0+16]
RtlUserThreadStart [0x00007FFCA4E7ECDB+43]
我想运行与网络驱动程序相同的 Chrome 浏览器版本。
您可以在Python中使用带有selenium的chrome驱动程序来打开页面并获取页面内容。