New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to run as Grid node #145
base: master
Are you sure you want to change the base?
Conversation
Hi @sbabcoc, many thanks for the contribution. So far i have not done anything with the grid version of selenium but i think this is a rally great addition to the current impl. I'm a bit busy during the next days but will have a closer look at this at the end of the next week. But i have a first question - do you have an idea how to test this as part of our CI? |
Hi, @rbri, The test for this would be to ensure that HtmlUnitDriver can be instantiated as a RemoteWebDriver instance. The behavior of a working implementation should be indistinguishable from a direct instance of HtmlUnitDriver. This was possible in Selenium 3, because the Grid Node implementation provided special-case handling for HtnlUnitDriver through an in-memory wrapper. This special-case support was removed in Selenium 4. For now, it's probably best to ignore this PR. It's nowhere near ready to be merged. I've been poking at this for a while and keep falling into the gaping holes in my knowledge about how Selenium driver executable are assembled. What I'm imagining is needed is a Java executable that wraps the HtmlUnitDriver class in a LocalNode container that routes requests to the correct WebDriver functions and sends back the responses. I sent you an email the other day requesting suggestions for what should be included in the HtmlUnitOptions class that will be needed to complete this wrapper. It seems that the WebClientOptions class encapsulates everything, so perhaps we can create an extension of AbstractDriverOptions that builds one of these. |
91cf24b
to
8abb4eb
Compare
d7ec645
to
89f02c9
Compare
@rbri I have this PR to a point where all of the HtmlUnit options can be set via a custom Capabilities class (HtmlUnitDriverOptions). This is essentially a Capabilities wrapper for the WebClientOptions class, with an added BrowserVersion property. This could potentially open up scenarios that weren't previously accessible. I still need to create a launcher to enable standalone execution. |
89f02c9
to
4e55cfc
Compare
To make the capabilities completely portable, I think I'll need to define a serialization mechanism for the BrowserVersion class and the types it uses. |
3fae804
to
9339dcc
Compare
0ec6494
to
8f583f0
Compare
9032c81
to
40ab727
Compare
40ab727
to
44d8892
Compare
No description provided.