-
-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support latest chrome driver version (#445)
* Make tests compatible to arm mac CPUs
- Loading branch information
1 parent
6b17f06
commit dc73f4a
Showing
6 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[requires] | ||
python = "3.7" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from packaging import version | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yc5
Contributor
|
||
from webdriver_manager.core.driver import Driver | ||
from webdriver_manager.core.logger import log | ||
from webdriver_manager.core.utils import ChromeType, is_arch, is_mac_os | ||
|
@@ -29,10 +30,22 @@ def get_os_type(self): | |
return os_type | ||
|
||
if is_arch(os_type): | ||
return f"{os_type.replace('_m1', '')}_m1" | ||
return "mac_arm64" | ||
|
||
return os_type | ||
|
||
def get_url(self): | ||
browser_version = self.get_version() | ||
os_type = self.get_os_type() | ||
|
||
# For Mac ARM CPUs after version 106.0.5249.61 the format of OS type changed | ||
# to more unified "mac_arm64". For newer versions, it'll be "mac_arm64" | ||
# by default, for lower versions we replace "mac_arm64" to old format - "mac64_m1". | ||
if version.parse(browser_version) < version.parse("106.0.5249.61") : | ||
os_type = os_type.replace("mac_arm64", "mac64_m1") | ||
|
||
return f"{self._url}/{browser_version}/{self.get_name()}_{os_type}.zip" | ||
|
||
def get_browser_type(self): | ||
return self._browser_type | ||
|
||
|
#454 dependency "packaging" used without definition in pipfile