MarketSquare / webdrivermanager

Python module to facilitate downloading and deploying WebDriver binaries for Chrome, Firefox, Opera & Edge
https://pypi.org/project/webdrivermanager/
MIT License
100 stars 38 forks source link

Edge driver download does not work #73

Closed Nepitwin closed 1 year ago

Nepitwin commented 3 years ago

The Edge driver download does not work.

Windows 10 X64 20H2 Python : 3.8.8 (VENV) AppDirs : 1.4.4 Requests : 2.26.0 Tqdm : 4.61.2 BeautifulSoup4 : 4.9.3 Webdrivermanager : 0.10.0

Example code

from webdrivermanager import EdgeDriverManager

if __name__ == '__main__':
    driver = EdgeDriverManager()
    driver.download_and_install()

Output trace

Traceback (most recent call last):
  File "D:/Git/util/webdriver/main.py", line 63, in <module>
    check_and_install_for_browser(driver_manager, BrowserType.Edge)
  File "D:/Git/util/webdriver/main.py", line 54, in check_and_install_for_browser
    driver.install_driver(browser_type)
  File "D:/Git/util/webdriver/main.py", line 44, in install_driver
    browser.driver.download_and_install()
  File "D:\Git\util\webdriver\venv\lib\site-packages\webdrivermanager\base.py", line 271, in download_and_install
    filename_with_path = self.download(version, show_progress_bar=show_progress_bar)
  File "D:\Git\util\webdriver\venv\lib\site-packages\webdrivermanager\base.py", line 229, in download
    dl_path = Path(self.get_download_path(version))
  File "D:\Git\util\webdriver\venv\lib\site-packages\webdrivermanager\edge.py", line 24, in get_download_path
    return self.download_root / "edge" / version
TypeError: unsupported operand type(s) for /: 'WindowsPath' and 'NoneType'
Robdebert commented 2 years ago

I have the same problem.

I typed this in the command-line:

webdrivermanager chrome firefox edge --linkpath %LOCALAPPDATA%\Programs\Python\Python310

which works well for Chrome and Firefox, bot not for Edge:

Downloading WebDriver for browser: "edge" Traceback (most recent call last): File "{userdir}\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "{userdir}\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "{userdir}\AppData\Local\Programs\Python\Python310\Scripts\webdrivermanager.exe__main.py", line 7, in File "{userdir}\AppData\Local\Programs\Python\Python310\lib\site-packages\webdrivermanager\main__.py", line 81, in main extracted_binary, link = downloader.download_and_install(version) File "{userdir}\AppData\Local\Programs\Python\Python310\lib\site-packages\webdrivermanager\base.py", line 271, in download_and_install filename_with_path = self.download(version, show_progress_bar=show_progress_bar) File "{userdir}\AppData\Local\Programs\Python\Python310\lib\site-packages\webdrivermanager\base.py", line 229, in download dl_path = Path(self.get_download_path(version)) File "{userdir}\AppData\Local\Programs\Python\Python310\lib\site-packages\webdrivermanager\edge.py", line 24, in get_download_path return self.download_root / "edge" / version TypeError: unsupported operand type(s) for /: 'WindowsPath' and 'NoneType'

moshikd commented 2 years ago

I'm Facing the same issue. any update on a fix?

I also encountered an issue with Firefox. the latest geckoDriver is 0.31 and when i run: webdrivermanager chrome firefox edge --linkpath AUTO the geckoDriver version is 0.29 and not compatible with Firefox browser 100.0 (64-bit)