Is it planned DevTools (CDP) to be used with RemoteWebDriver?

629 views
Skip to first unread message

Nikolay Stanoev

unread,
Sep 3, 2021, 1:03:49 AM9/3/21
to Selenium Users
Hello,

With Selenium4.0.0-rc-1 (java binding) I am able to run tests with ChromeDriver / FirefoxDriver / EdgeDriver and use CDP successfully. If i try to use CDP with RemoteWebDriver class - it is not possible.

I see that CDP is implemented in ChromiumDriver and FirefoxDriver. Due to that direct class instance is able to work with .getDevTools() method. And RemoteWebDriver does not implemented this interface HasDevTools. 

So my questions are:
  • What are the plans for CDP support with RemoteWebDriver?
  • Is it expected selenium4 to be released without CDP support for Selenium Grid executions?
Thank you in advance!

Nikolay Stanoev

unread,
Oct 15, 2021, 2:46:12 AM10/15/21
to Selenium Users
Hello,

Issue is solved - CDP works for Chrome and Edge browsers in Selenium Grid. In order to get access to devTools you will have to augment the driver first. Few examples how to do that:

webDriver = new Augmenter().augment(webDriver);

or

return RemoteWebDriver

  .builder()

  .augmentUsing(new Augmenter())

  .oneOf(capabilities)

  .address(SELENIUM_GRID)

  .build();


Veena

unread,
Mar 7, 2022, 11:57:29 AM3/7/22
to Selenium Users
Hi 
I have tried like this 

ChromeDriver driver = (ChromeDriver) RemoteWebDriver.builder()
.oneOf(browserOptions)
.setCapability("lt:options", ltOptions)
.address("SELENIUM_HUB")
.config(config)
.build();

Getting class org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$JGRDxNjS cannot be cast to class org.openqa.selenium.chrome.ChromeDriver

can someone help me to get DevTool of RemoteWebDriver Object?
Reply all
Reply to author
Forward
0 new messages