htmlunit-driver icon indicating copy to clipboard operation
htmlunit-driver copied to clipboard

HtmlUnitDriver needs to provide WebDriverInfo and DriverService service providers for Selenium 4 Grid

Open sbabcoc opened this issue 2 years ago • 3 comments

In order for Selenium 4 NodeOptions to resolve the "htmlunit" browser name to HtmlUnitDriver, it needs an implementation of the WebDriverInfo to provide the association. Without this service provider implementation, we get failures like the one shown in the attached Grid 4 server log.

org.openqa.selenium.grid.config.ConfigException: Unable to find matching driver for Capabilities {browserName: htmlunit, browserVersion: chrome, platformName: Windows 10}

grid-node-5.log

sbabcoc avatar Aug 22 '23 19:08 sbabcoc

Will have a look, i guess i can implement WebDriverInfo for the next release

rbri avatar Aug 23 '23 17:08 rbri

We apparently also need an HtmlUnitDriverService, which extends org.openqa.selenium.remote.service.DriverService. This may be the more involved task, because it seems to require packaging up HtmlUnitDriver into a service that can launch and manage a separate process. With my own versions of these two classes, I've managed to launch and register an HtmlUnitDriver node in a local Grid 4 instance. I haven't tried to actually get a session yet, as the response I get back from a status request is malformed. I'll post further updates as the situation evolves.

sbabcoc avatar Aug 25 '23 19:08 sbabcoc

I abandoned my attempt to stand up a Grid 4 node that provides HtmlUnit sessions. I need to examine the InMemorySession feature of Selenium 3 to determine the size and complexity of the implementation.

sbabcoc avatar Aug 28 '23 20:08 sbabcoc

I've created the HtmlUnit Remote project to resolve this issue.

sbabcoc avatar Jun 29 '24 05:06 sbabcoc