-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from bollwyvl/add-selenium-manager
add selenium-manager dependency from conda-forge
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/selenium/webdriver/common/selenium_manager.py b/selenium/webdriver/common/selenium_manager.py | ||
index d62ffaa..f78f60a 100644 | ||
--- a/selenium/webdriver/common/selenium_manager.py | ||
+++ b/selenium/webdriver/common/selenium_manager.py | ||
@@ -39,19 +39,8 @@ class SeleniumManager: | ||
|
||
:Returns: The Selenium Manager executable location | ||
""" | ||
- platform = sys.platform | ||
- | ||
- dirs = { | ||
- "darwin": "macos", | ||
- "win32": "windows", | ||
- "cygwin": "windows", | ||
- } | ||
- | ||
- directory = dirs.get(platform) if dirs.get(platform) else platform | ||
- | ||
- file = "selenium-manager.exe" if directory == "windows" else "selenium-manager" | ||
- | ||
- path = Path(__file__).parent.joinpath(directory, file) | ||
+ import shutil | ||
+ path = Path(shutil.which("selenium-manager") or shutil.which("selenium-manager.exe")) | ||
|
||
if not path.is_file(): | ||
raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}") |
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