selenium
selenium copied to clipboard
Add `NewSeleniumServiceV4` to support cli args for selenium version 4
Selenium V3 seems to now be considered legacy (https://www.selenium.dev/documentation/legacy/selenium_3/). This PR adds NewSeleniumServiceV4 which sets up the service using the new format for v4. During my (admittedly limited) testing it seems to work as a drop-in replacement for Selenium V3 implementation.
Would it be possible to merge this? @minusnine
I'm also not sure that this is correct. The PR uses /wd/hub
as the urlPrefix
(which is a suffix btw), which doesn't seem to be used by selenium 4:
GET http://localhost:4444/wd/hub
->
{
"value": {
"error": "unknown command",
"message": "Unable to find handler for (GET) \u002fwd\u002fhub",
"stacktrace": ""
}
}
(same for POST)
@Prendo93 did this actually work for you?
Can confirm this is working for me with https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/selenium-server-4.1.1.jar
I think the urlPrefix is named thus because there are other routes called, eg: /wd/hub/session
etc.
Hm, ok. Do you specify a prefix? Or do you omit it? Would you mind posting a quick example where it's running for you? Would help tremendously!
Edit: it actually does work! It just doesn't work with the selenium standalone docker images for some reason.