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

Fix #422 #442 #464 #494

Merged

Conversation

aleksandr-kotlyar
Copy link
Collaborator

@aleksandr-kotlyar aleksandr-kotlyar commented Mar 8, 2023

Resolves #415
Resolves #422
Resolves #442
Resolves #464

Fixed queries to GitHubApi when driver found in cache for firefox/ie/opera.
Fixed falling with Exception if browser was not determined, no more falls with this reason from now on.
Fixed metadata and paths storage for "latest".
Fixed version download logic for Chrome/Edge:

  • if version="latest" - downloads LATEST_RELEASE for Chrome/Chromiums and LATEST_STABLE for Edge;
  • if version=x.x.x - downloads x.x.x;
  • if version is None - tries to determine installed browser version, and if fail - downloads like "latest" - LATEST_RELEASE.

Plus:
Great refactoring in Driver and DriverCache which should make them easier to read and support.
Great function call optimizations to make easier to debug webdriver-manager issues.

…_version_to_download()`

Driver.get_driver_version_to_download returns:
- version from version parameter if version not None or "latest";
- latest, if version is "latest" or browser could not been determined;
- determined browser version driver in all others ways.
description of fix:
Now if version="latest" - downloads LATEST_RELEASE for Chrome/Chromiums and LATEST_STABLE for Edge
if version=x.x.x - downloads x.x.x
if version is None - tries to determine installed browser version, and if fail - downloads like "latest" - LATEST_RELEASE

also:
- no more Exception if browser not determined
- optimize os_type() calls and some var namings
- no more rewriting self._version
…h by some reasons (for example: not enough space on disk or not enough rights, or antivirus deletion)
…ache_key_driver_version with unified method DriverCache::get_cache_key_driver_version()
…key for diff usage places in DriverCache class.

Also:
- rename get_metadata to load_metadata_content
- pass into __save_metadata 1 param: driver instead of 4 params
- clean save_file_to_cache from redundant vars
@SergeyPirogov
Copy link
Owner

Great job @aleksandr-kotlyar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment