-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[rust] Include support for Safari in Selenium Manager #11609
Conversation
|
No. I cannot install the current Safari beta in my macOS (since the beta is for Monterrey and mine is Ventura), but I investigated the content of the package of the current Safari beta (called
No. As I said, in Selenium Manager, for symmetry with the rest of the browsers, the "technology preview" is considered in Selenium Manager using the browser version |
Except that is how selenium bindings differentiate it. Either the logic goes in the manager or it has to be created in each of the bindings, and removing the need to have special safari logic in the bindings was the whole point of adding this functionality to Selenium Manager in the first place. |
Hmm, maybe we can override the browser version in bindings as part of setting preview... |
Yes, the bindings differentiate Safari and Safari Technology preview, but I am not sure if that was a correct decision. The driver has the same name, just in a different location. I think it is fine to have it in Selenium Manager as |
Only Java has two separate service classes, the rest just toggle the location based on the options. Whatever we do, the goal is not to have special code for safari in any of the bindings. I think we need to understand how it will be implemented before merging this. |
@titusfortner In your original request you mentioned the following for Safari TP:
Instead of that, I am proposing to use the following to get the same result:
|
Right, I'm not sure we can make that work in all of the bindings without adding the custom code I want to avoid, but we can see. |
Thinking more about this, I am not even sure I agree on merging this. I understand the idea is to avoid the bindings hard coding the SafariDriver path location, but now we need to hard code I remember the main idea of Selenium Manager was to download the drivers and in the future download the browsers. I perceive this type of work is not adding much value to the user and it is slowing us down in terms of reaching the point where we want to start working on browser download. |
Was just looking at how the Grid chooses Technology Preview, and it also does it based on Browser name:
I could change the bindings code to set "dev" as the browser version when someone specifies STP, but we'd also have to muck about in the grid code. If we want to support Safari Technology Preview, Selenium Manager should treat STP as a separate browser the same way that Grid does. |
102f6a2
to
9af252b
Compare
My point was around having Selenium Manager doing this. The user still needs to download and install the browsers. And it is not that the bindings are having an extremely complicated logic to handle this. Selenium Manager is supposed to stop the user from doing manual setups, but for STP they will still need to do it anyway. |
The reason for my request was so that the common logic for managing all driver locations exists in the Selenium Manager instead of in the bindings. The bindings don't need conditionals or to store constants, the DriverFinder pings Selenium Manager with browser name, and Selenium Manager verifies the driver exists and provides the location. |
OK, I guess we can go back and forth for a while with this. We need to find a way to merge this so we can move forward. @bonigarcia would it be too complicated to add STP as a browser in Selenium Manager so we centralize this logic there? After this, let's check https://github.com/orgs/SeleniumHQ/projects/5/views/1 and see which ones are a "must" before we dig into browser downloads. |
@diemol: As you know, Safari differs from the other browsers since its driver is shipped with the browser itself. This difference impacts the internal design of the Selenium Manager. You can see in the current PR that I needed to include several conditions to do differently for Safari ( Moreover, the current API exposed by Selenium Manager (which will be used as a crate, theoretically) has the methods For all these reasons, and because SafariTP is basically a dev version of Safari (currently SafariTP is 16.4 and Safari is 16.1, and there is a beta in the middle), I decided to create the PR like it is now, i.e., reusing the Being all this said, and answering your question, yes, it is perfectly possible to add another browser (SafariTP) in addition to Safari (i.e., a new browser with a different name). And it is not particularly difficult regarding the required code. But even including the SafariTP as a browser, the I can submit a new patch to this PR, and decide which option is better (i.e., two Safari browsers, or only one, using the |
dcd04da
to
380ecac
Compare
Some output examples with the last patch:
|
That output above is exactly what will help the selenium code. So, fyi, Selenium bindings are going to stop using I kind of wish from the Selenium/Apple side we managed Safari Technology Preview as a |
Description
This PR implements the support of Safari in Selenium Manager, as requested in #11522.
In addition to the stable release of Safari, and according to its resources page, there are two more distributions of Safari: beta, and Technology Preview. For symmetry with the rest of the browser (Chrome, Firefox, etc.), the "technology preview" is considered in Selenium Manager using the
dev
label (for browser version). The beta version is also considered.Here it is some example executed in macOS (with Safari stable and Technology Preview installed):
Motivation and Context
Part of Selenium Manager M3, requested in #11522.
Types of changes
Checklist