-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rust] Include arguments for skipping drivers and browsers in path #12960
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
Conversation
|
This makes sense. It would leave SM ready for Selenium 5. As in, SM takes care of everything and users need to opt out if they do not want it. |
|
Is the plan that these reflect the desired behavior for 5 and we will toggle the default from false to true? |
I think so. |
f310e67 to
a9583c3
Compare
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #12960 +/- ##
=======================================
Coverage 56.49% 56.49%
=======================================
Files 86 86
Lines 5255 5255
Branches 187 187
=======================================
Hits 2969 2969
Misses 2099 2099
Partials 187 187 ☔ View full report in Codecov by Sentry. |
a9583c3 to
907a368
Compare
|
How about one temporary toggle for |
|
actually, that's not true, we aren't going to ignore path in Selenium 5. what we need is to allow users to "opt-in" to Selenium 5 behavior, which means if what is found on PATH doesn't match, a driver will be downloaded. We need one toggle of "enable selenium manager" to explicitly opt-in to Selenium 5 behavior We can get rid of offline mode and use this instead, which will also make the error messages much more accurate. |
titusfortner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no on this pending the decision made in #12985
|
I am convinced this PR needs to be merged for the next Selenium Manager. In other words, merging this PR is independent of what you decide for Selenium 5. Some users have asked for this feature, and we can provide a solution for them by simply merging this PR. For Selenium 5, we can get rid of these arguments or simply reuse the logic already implemented. However, the problem of using an incompatible driver in the PATH is real. I have experienced the problem myself. Today I am preparing some examples for my talk tomorrow at the Selenium Open Space Conference. I created a basic repo example: https://github.com/bonigarcia/selenium-examples The thing is, I created a basic test that uses the automated management capability provided by Selenium Manager, doing the following: Well, this test cannot be executed in GitHub Actions, since the workers have chromedriver 118 in its path, and Selenium Manager always uses it. As a result, my test using Chrome 117 cannot be executed in any way: You can see the execution here: https://github.com/bonigarcia/selenium-examples/actions/runs/6670148598/job/18129435516 All in all, this feature is a must today, independently of Selenium 5. |
|
Right, I'm saying if a user opts in to Selenium 5 behavior, then the value passed in to the browserVersion must always be respected regardless of what is on PATH. Local is used if it matches, and it is downloaded otherwise. I'm concerned about continuing to add flags to support beta behavior rather than for what we want to see in released product. This should allow us to simplify the code. |
|
And I'm not suggesting we wait for Selenium 5. I'm saying we should allow people to get Selenium 5 behavior with a flag that can be removed when we actually release Selenium 5. |
|
We can revisit this if #13159 is not sufficient. Thanks. |
Description
This PR implements a couple of new arguments in Selenium Manager:
--skip_driver_in_path: For not using the drivers found in the PATH.--skip_browser_in_path: For not using the browsers found in the PATH.As usual, these arguments can be enabled using the config file or environment variables (e.g.,
SE_SKIP_DRIVER_IN_PATH=true).The following executions showcase its use:
Usual execution with (incompatible) driver in path:
Same execution with (incompatible) driver in the path but using
--skip_driver_in_path:Motivation and Context
Although this is not the usual use case, it might be helpful for some users (e.g., #12957).
Types of changes
Checklist