Feature and motivation
The goal for SM while in beta has been to maintain backwards compatibility and require users to "opt-in" to using it.
Right now you opt in by not specifying driver location in Service class or setting it in System Property, and removing any drivers on PATH. Sometimes you don't have full control over this (CI tools like GitHub Actions: #13081), so there should be an alternate way to opt-in. One option is to be explicit and support "SE_SELENIUM_MANAGER=true" (#12985). Perhaps a better option is to be implicit and have users opt-in by specifying a browserVersion that does not match what is on the system.
If there is an old driver on the system, right now we use it, regardless of anything else.
This request would have us:
- Check local browser version
- If it matches provided
browserVersion in capabilities, use that browser
- If they don't match, download matching browser
- Look for matching driver version on the system
- If found, use it.
- If not found, download it
So the only difference between Selenium 4 behavior and Selenium 5 behavior will be how we handle it when browserVersion is empty:
Selenium 4 behavior is to use whatever driver is found;
Selenium 5 behavior is to determine the local browser version and get the right driver for it even if it is not what is on the system.
Usage example
options = Selenium::WebDriver::Options.chrome(browser_version: "stable")
driver = Selenium::WebDriver.for :chrome, options: options
Feature and motivation
The goal for SM while in beta has been to maintain backwards compatibility and require users to "opt-in" to using it.
Right now you opt in by not specifying driver location in
Serviceclass or setting it in System Property, and removing any drivers on PATH. Sometimes you don't have full control over this (CI tools like GitHub Actions: #13081), so there should be an alternate way to opt-in. One option is to be explicit and support"SE_SELENIUM_MANAGER=true"(#12985). Perhaps a better option is to be implicit and have users opt-in by specifying abrowserVersionthat does not match what is on the system.If there is an old driver on the system, right now we use it, regardless of anything else.
This request would have us:
browserVersionin capabilities, use that browserSo the only difference between Selenium 4 behavior and Selenium 5 behavior will be how we handle it when browserVersion is empty:
Selenium 4 behavior is to use whatever driver is found;
Selenium 5 behavior is to determine the local browser version and get the right driver for it even if it is not what is on the system.
Usage example