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

EES-4444 Swap pyderman for webdriver-manager #4254

Merged
merged 1 commit into from
Aug 21, 2023
Merged

EES-4444 Swap pyderman for webdriver-manager #4254

merged 1 commit into from
Aug 21, 2023

Conversation

ntsim
Copy link
Collaborator

@ntsim ntsim commented Aug 21, 2023

This PR changes the downloading of Chromedriver to use webdriver-manager instead of pyderman. This was motivated by a recent change to how Chromedriver downloads are published, meaning that JSON endpoints should be called for correct versions: https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints

Currently, webdriver-manager supports this, but pyderman does not. See:

Webdriver download directory

Note that a major difference with pyderman is that Webdrivers are now installed globally to your home directory in the ~/.wdm directory. The current webdriver directory in the project itself is now redundant and will not actually be used.

This replaces Pyderman, which currently doesn't support Chrome 115+
due to recent changes in how Chrome versions are published.

See:
- SergeyPirogov/webdriver_manager#580
- shadowmoose/pyderman#35
version=version,
)
def get_webdriver(version: Optional[str] = None) -> None:
driver_path = ChromeDriverManager(driver_version=version).install()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is chromedriver getting saved?

Having it downloaded to the webdrivers directory previously was useful to allow you to manually download a different version and use that rather than what the script downloads, which has happened on occasion.

Copy link
Collaborator Author

@ntsim ntsim Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the PR summary, all webdrivers get downloaded to your home directory in ~/.wdm. Each version downloaded gets its own directory, so you can just delete these as required.

However, I think WDM by default will just try and figure out what Chrome you're using and get the correct version based on that.

If you want to download a specific version, you'll need to use the --chromedriver flag when running the tests.

@ntsim ntsim merged commit 5fed3ff into dev Aug 21, 2023
6 checks passed
@ntsim ntsim deleted the ees-4444 branch August 21, 2023 10:37
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.

2 participants