Skip to content

Commit

Permalink
fix for conda install of selenium-manager
Browse files Browse the repository at this point in the history
conda doesn't seem to properly package selenium-manager, so it needs
to be install as a separate package (via conda). But this puts it in
the environment's bin folder.

This commit checks the path for the selenium-manager executable if
it isn't installed in the package's webdriver/common/<platform>/
folder.

fixes SeleniumHQ#11234 and SeleniumHQ#12084
  • Loading branch information
stevetracvc committed Aug 11, 2023
1 parent a4beba5 commit 7641670
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py/selenium/webdriver/common/selenium_manager.py
Expand Up @@ -19,6 +19,7 @@
import subprocess
import sys
from pathlib import Path
import shutil
from typing import List

from selenium.common import WebDriverException
Expand Down Expand Up @@ -53,6 +54,9 @@ def get_binary() -> Path:

path = Path(__file__).parent.joinpath(directory, file)

if not path.is_file():
# conda has a separate package selenium-manager, installs in bin folder
path = Path(shutil.which(file))
if not path.is_file():
raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}")

Expand Down

0 comments on commit 7641670

Please sign in to comment.