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

downloads chrome driver using url from google's new json endpoint #49

Conversation

shawnCaza
Copy link
Collaborator

@shawnCaza shawnCaza commented Jul 21, 2023

On the surface the driver download seems to work, proper directory is added to PATH, but selenium isn't recognizing the driver.

Can anyone spot what I'm missing?

@GQAssurance
Copy link

Not a simple fix; there's basically 4 things that changed all at once for 115+ chromedriver:

  • The URLs to get version lists + binaries
  • The formatting of the version lists (now it's JSON)
  • the MacOS naming convention
  • The zip files now have binaries inside a directory

I have prototyped changes that I hope will be backwards compatible, and should make a pull request shortly.

@shawnCaza
Copy link
Collaborator Author

There's a bug in Chrome 115 for mac where the chrome binary needs to be specified.

Once I set the location using:

options = webdriver.ChromeOptions()
    options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

This pull release works as excepted on Mac x64.

@GQAssurance
Copy link

Your PR would break backwards compatibility, which is fine in the long term (who tests more than a few version backwards anyways?) but in the short term it means people testing 108-114 will not get a chromedriver

it also changes the installed directory, which others might depend on for other reasons

@shawnCaza
Copy link
Collaborator Author

@GQAssurance I believe this solution addresses your bullet points.

@shawnCaza
Copy link
Collaborator Author

shawnCaza commented Jul 21, 2023

You're right the Milestone JSON API only goes back to 113. Polling both the old XML and JSON for drivers could assist with people needing to test old drivers.

Changing the installed directory isn't something I'm expecting. At least for me the driver is showing up in the same place previous drivers are found.
Screenshot 2023-07-21 at 12 10 58 PM

@GQAssurance
Copy link

GQAssurance commented Jul 21, 2023

Yes I saw you handled the directory in the zip a slightly different way than I did.

The JSON apis do list Chrome versions 113 & 114, but those versions did not publish ChromeDriver to the new location. So the new JSONs are only reliable for versions 115+

I am proposing an alternate PR to support 115, which is designed to be fully backwards compatible:
#50

@shawnCaza shawnCaza closed this Jul 24, 2023
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.

3 participants