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

Improve regex for chrome version #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

brummetj
Copy link

@brummetj brummetj commented Jun 4, 2020

Hey there!

There was a small issue with downloading specific chromedrivers as the versions have gotten extra long and extravagant. For example to download chromedriver version 80, you would have to type out webdrivermanager chrome:83.0.4103.14 ... man that is brutal!

I went ahead and improved the regex for the name key from the API request to account for just getting a specific version by doing something like chrome:83 or chrome:80 to keep things simple, and of course you can go deeper in the version number, as i just just add .0 to the version number to make sure it doesn't pick up a random minor version when doing the regex. ( most major version number releases will have something like 81.0 or 83.0 )... so this should suffice.

With this you can just write webdriveragent chrome:83 now and it will download chromdriver version 83.

cheers

@rasjani
Copy link
Contributor

rasjani commented Jun 5, 2020

Hiya and thanks for the PR. Idea looks useful - Ill have a look of the changes over the weekend.

@brummetj
Copy link
Author

brummetj commented Jun 5, 2020

Perfect thanks!

I just fixed up the logic a little for handling the "latest" and I made it so it will always grab the last entry in the entry list, which is helpful for using the new logic I'm introducing for grabbing version by something like chrome:83, so it will always get the latest version of 83.

@xylix
Copy link

xylix commented Jan 15, 2021

@rasjani we make quite a lot of use of webdrivermanager.py at robocorp/rpaframework. Would be interested in getting this merged. What are the current parts blocking this PR from being merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants