diff --git a/py/selenium/webdriver/common/selenium_manager.py b/py/selenium/webdriver/common/selenium_manager.py index 87c956efc1492..3f95d309b95e0 100644 --- a/py/selenium/webdriver/common/selenium_manager.py +++ b/py/selenium/webdriver/common/selenium_manager.py @@ -67,6 +67,9 @@ def driver_location(self, browser: str) -> str: if browser not in allowed: raise SeleniumManagerException(f"{browser} is not a valid browser. Choose one of: {allowed}") + if browser == 'ie': + browser = 'iexplorer' + binary, flag, browser = str(self.get_binary()), "--browser", browser result = self.run((binary, flag, browser)) executable = result.split("\t")[-1].strip() diff --git a/py/selenium/webdriver/common/service.py b/py/selenium/webdriver/common/service.py index 904994bac186d..f2a1ca8a22d9f 100644 --- a/py/selenium/webdriver/common/service.py +++ b/py/selenium/webdriver/common/service.py @@ -92,8 +92,7 @@ def start(self) -> None: if "executable needs to be in PATH" in err.msg: logger.debug("driver not found in PATH, trying Selenium Manager") browser = self.__class__.__module__.split(".")[-2] - if browser == 'ie': - browser = 'iexplorer' + try: path = SeleniumManager().driver_location(browser) except WebDriverException as new_err: