Skip to content

[🐛 Bug]: Selenium manager not found via Anaconda distribution #11234

@Fradhyle

Description

@Fradhyle

What happened?

I tried to test new Selenium manager feature with Python 3.9.13 and Edge 107.0.1418.35 (Stable) (64bit), but the exception occurs.

The code I tried

from selenium import webdriver
driver = webdriver.Edge()

and the message is this
WebDriverException: Message: 'msedgedriver' executable needs to be in PATH. Please download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

If I enter msedge on the 'Run' window, Edge browser opens normally.

How can we reproduce the issue?

from selenium import webdriver
driver = webdriver.Edge()

Relevant log output

WebDriverException                        Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     96                 try:
---> 97                     path = SeleniumManager.driver_location(browser)
     98                 except WebDriverException as new_err:

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\selenium_manager.py in driver_location(browser)
     66
---> 67         args = (str(SeleniumManager.get_binary()), "--browser", browser)
     68         result = SeleniumManager.run(args)

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\selenium_manager.py in get_binary()
     51         if not path.is_file():
---> 52             raise WebDriverException("Unable to obtain Selenium Manager")
     53

WebDriverException: Message: Unable to obtain Selenium Manager


During handling of the above exception, another exception occurred:

WebDriverException                        Traceback (most recent call last)
<ipython-input-2-9e8e880ac5d1> in <cell line: 1>()
----> 1 driver = webdriver.Edge()

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\edge\webdriver.py in __init__(self, executable_path, port, options, service_args, capabilities, service_log_path, service, keep_alive, verbose)
     71             service = Service(executable_path, port, service_args, service_log_path)
     72
---> 73         super().__init__(
     74             DesiredCapabilities.EDGE["browserName"],
     75             "ms",

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\chromium\webdriver.py in __init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
    101
    102         self.service = service
--> 103         self.service.start()
    104
    105         try:

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     98                 except WebDriverException as new_err:
     99                     logger.debug("Unable to obtain driver using Selenium Manager: " + new_err.msg)
--> 100                     raise err
    101
    102                 self._start_process(path)

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     89         """
     90         try:
---> 91             self._start_process(self.path)
     92         except WebDriverException as err:
     93             if "executable needs to be in PATH" in err.msg:

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in _start_process(self, path)
    201         except OSError as err:
    202             if err.errno == errno.ENOENT:
--> 203                 raise WebDriverException(
    204                     f"'{os.path.basename(self.path)}' executable needs to be in PATH. {self.start_error_message}"
    205                 )

WebDriverException: Message: 'msedgedriver' executable needs to be in PATH. Please download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Operating System

Windows 10 Enterprise 22H2

Selenium version

Python 4.6.0

What are the browser(s) and version(s) where you see this issue?

Edge 107.0.1418.35 (Stable) (64bit)

What are the browser driver(s) and version(s) where you see this issue?

Selenium Manager

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

Labels

C-pyPython BindingsC-rustRust code is mostly Selenium ManagerI-defectSomething is not working as intended

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions