diff --git a/py/selenium/webdriver/common/selenium_manager.py b/py/selenium/webdriver/common/selenium_manager.py index 8fb974d653022..fa26f73b9f9c0 100644 --- a/py/selenium/webdriver/common/selenium_manager.py +++ b/py/selenium/webdriver/common/selenium_manager.py @@ -101,7 +101,7 @@ def driver_location(self, options: BaseOptions) -> str: driver_path = output["driver_path"] logger.debug("Using driver at: %s", driver_path) - if hasattr(options.__class__, "binary_location"): + if hasattr(options.__class__, "binary_location") and browser_path: options.binary_location = browser_path options.browser_version = None # if we have the binary location we no longer need the version