Home > Enterprise >  Chrome Driver - no longer able to use DevTools api of a web driver session opened by selenium
Chrome Driver - no longer able to use DevTools api of a web driver session opened by selenium

Time:05-26

I can no longer use DevTools remote debugging port api calls from a chrome driver instance that was started by selenium chromedriver.

Previously we could use the dev-tools port using chrome-remote-interface.

Now, when I use chrome-remote-interface, the selenium webdriver seems to be unusable.

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.

This also works.

Now I try to use the Java web driver again:

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:me&can=2

Does anyone know a solution to this?

CodePudding user response:

You no longer need to use chrome-remote-interface to access the chrome debugging port. You can now use Selenium 4's new ChromeDriver dev tools SDK to execute commands against chrome through the CDP.

Switching to this fixed the problem.

  • Related