[英]Chrome Driver - no longer able to use DevTools api of a web driver session opened by selenium
I can no longer use DevTools remote debugging port api calls from a chrome driver instance that was started by selenium + chromedriver.我不能再使用由 selenium + chromedriver 启动的 chrome 驱动程序实例的 DevTools 远程调试端口 api 调用。
Previously we could use the dev-tools port using chrome-remote-interface.以前我们可以使用 chrome-remote-interface 使用 dev-tools 端口。
Now, when I use chrome-remote-interface, the selenium webdriver seems to be unusable.现在,当我使用 chrome-remote-interface 时,selenium webdriver 似乎无法使用。
So for example, let's say I:例如,假设我:
driver = new ChromeDriver()
Then I do this to go to a site:然后我这样做是为了去一个网站:
driver.get("https://some-site.com")
So far so good.到目前为止,一切都很好。
Then I use the remote-debugging-port to make request as well.然后我也使用远程调试端口发出请求。
See: https://github.com/cyrus-and/chrome-remote-interface for an example.有关示例,请参见: https ://github.com/cyrus-and/chrome-remote-interface。
This also works.这也有效。
Now I try to use the Java web driver again:现在我再次尝试使用 Java Web 驱动程序:
driver.get("https://some-site.com")
And I get an error:我得到一个错误:
[1651087065.452][INFO]: Done waiting for pending navigations. Status: timeout: Timed out receiving message from renderer: 0.000
[1651087065.452][INFO]: [4ac1553138574d061b37a45836c35096] RESPONSE GetCookies ERROR timeout: Timed out receiving message from renderer: 0.000
(Session info: chrome=100.0.4896.127)
[126480:126508:0427/141746.195721:ERROR:cast_crl.cc(391)] CRL - Verification failed.
I created an issue tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=1320455&q=reporter%3Ame&can=2我创建了一个问题跟踪器: https ://bugs.chromium.org/p/chromium/issues/detail?id=1320455&q=reporter%3Ame&can=2
Does anyone know a solution to this?有谁知道解决这个问题?
You no longer need to use chrome-remote-interface to access the chrome debugging port.您不再需要使用 chrome-remote-interface 来访问 chrome 调试端口。 You can now use Selenium 4's new ChromeDriver dev tools SDK to execute commands against chrome through the CDP.
您现在可以使用 Selenium 4 的新 ChromeDriver 开发工具 SDK 通过 CDP 对 chrome 执行命令。
Switching to this fixed the problem.切换到这个解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.