Closed titusfortner closed 1 week ago
What we have now is trying to maintain Selenium 4 behavior unless a user opts-in. We want Selenium Manager to manage the PATH, so we can't completely toggle the whole binary on/off to get what we want right now, so we have to toggle whether Selenium Manager does downloads.
We're calling this "offline mode" which is a bad name for it because people don't understand why it is there or what it means, because they aren't offline, and they didn't set anything to be offline.
Offline mode is only to allow/disallow network calls to download binaries. But it still works and finds things on the PATH
.
So we can't completely toggle the whole binary on/off to get what we want right now
What we wanted was to always use the SM binary so we could centralize the logic that lived in different bindings. For example, to find something on PATH
. This is how you convinced me to use the binary in all cases. Why do we want now to turn on or off the SM binary?
That's the point, we don't want to toggle SM entirely, but we also don't want to get granular on what gets downloaded. We want to toggle between Selenium 5 behavior (download if PATH driver is bad) and beta behavior (always use PATH driver).
Offline mode is only to allow/disallow network calls to download binaries. But it still works and finds things on the PATH.
The name is correct from an implementation standpoint, but it is bad for logging/warnings because it is confusing to users.
That's the point, we don't want to toggle SM entirely, but we also don't want to get granular on what gets downloaded. We want to toggle between Selenium 5 behavior (download if PATH driver is bad) and beta behavior (always use PATH driver).
Offline mode is only to allow/disallow network calls to download binaries. But it still works and finds things on the PATH.
The name is correct from an implementation standpoint, but it is bad for logging/warnings because it is confusing to users.
So it is an argument to override what SM finds on PATH
or not. Which is not related to the offline toggle.
You're right, I was thinking through the grid logic incorrectly. There is still a difference in default behavior between the grid and the bindings, even when we add an explicit opt-in toggle for the bindings, because the lack of an opt-in is not opt-out.
Ok, thinking through where we are and where we want to be. I've updates the initial description with the specific requests.
We want:
true
in Grid for Selenium 5. We would disable it in Docker by overriding the --selenium-manager
flag.--ignore-path
I implemented this feature almost a year ago, but the PR was closed then. I need to check this code is consistent with the current trunk branch, but I believe we can reuse it:
https://github.com/SeleniumHQ/selenium/pull/12960
That PR implemented two flags: --skip-driver-in-path
and --skip-browser-in-path
. Do we want these two flags or a single one (--ignore-path
)?
Updated suggestions
--selenium-manager
toggle to--auto-update
--offline
to use--auto-update
. This is the Selenium 5 behavior that Grid is opting into and that bindings will get by default for Selenium 5.--auto-update
is set to true, Selenium Manager should ignore existing drivers if they are not the best match for the discovered/downloaded browser--auto-update
default to true instead of falseFeature and motivation
Selenium 4 behavior is to use driver specified in Service class, driver specified in System Properties (for Java), or driver found in PATH.
Selenium 5 behavior is going to use driver specified in Service class (or System Properties for Java), but if an outdated driver is found on PATH, Selenium will update it.
What we have now is trying to maintain Selenium 4 behavior unless a user opts-in. We want Selenium Manager to manage the PATH, so we can't completely toggle the whole binary on/off to get what we want right now, so we have to toggle whether Selenium Manager does downloads.
We're calling this "offline mode" which is a bad name for it because people don't understand why it is there or what it means, because they aren't offline, and they didn't set anything to be offline.
What we need is an explicit toggle to set Selenium 5 behavior now. This toggle gets set by grid users with
--selenium-manager true
This would allow us to remove the
--offline-mode
toggle, and would make it so we don't need-skip_driver_in_path
or-skip_browser_in_path
from #12960Usage example