Skip to content
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] Add --browser-version and --driver-version to selenium-manager #11100

Merged
merged 5 commits into from
Oct 11, 2022

Conversation

bonigarcia
Copy link
Member

Description

This PR includes two new configuration options for Selenium Manager (implemented as CLI arguments):

  • --browser-version : To force a given major browser version (e.g., 105, 106 , etc.).
  • --driver-version : To force a given driver version (e.g., 106.0.5249.61, 0.31.0, etc.).

Motivation and Context

This PR is part of the development of Selenium Manager M1.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@titusfortner
Copy link
Member

Is --driver-version implemented here, or is it a placeholder?

Is the idea to be able to do:

bazel run //rust:selenium-manager -- --browser chrome --browser-version 105 --driver-version 105.0.5195.52 

@bonigarcia
Copy link
Member Author

bonigarcia commented Oct 10, 2022

It is already implemented in this PR. But the idea is use one or another (--driver-version or --browser-version ), but not both, since it is redundant.

For example if you want to download an specific driver, you use --driver-version but not --browser-version, since the driver version implicitly refers to a browser version. In that case it would be:

bazel run //rust:selenium-manager -- --browser chrome --driver-version 105.0.5195.52 

If you want to force a (major) browser version, you use --browser-version, and Selenium Manager discover the proper driver version for that browser version. For instance:

bazel run //rust:selenium-manager -- --browser chrome --browser-version 105

@titusfortner
Copy link
Member

Ah, right, I didn't actually read the changes, sorry.

What errors is this giving when users send conflicting values?
I see the tests for passing values. Can we add tests for errors?

@bonigarcia
Copy link
Member Author

I have just committed a new patch with a test checking error conditions, and also, some logic to warn the user when both --driver-version and --browser-version are used (in that case, --browser-version is ignored).

rust/README.md Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Base: 52.31% // Head: 52.31% // No change to project coverage 👍

Coverage data is based on head (a7fe8ba) compared to base (b878a99).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #11100   +/-   ##
=======================================
  Coverage   52.31%   52.31%           
=======================================
  Files          82       82           
  Lines        5503     5503           
  Branches      198      198           
=======================================
  Hits         2879     2879           
  Misses       2426     2426           
  Partials      198      198           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@diemol diemol merged commit 53571b2 into trunk Oct 11, 2022
@diemol diemol deleted the manager-flags branch October 11, 2022 11:40
@diemol diemol added the hacktoberfest-accepted Temporary label Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants