MarketSquare / webdrivermanager

Python module to facilitate downloading and deploying WebDriver binaries for Chrome, Firefox, Opera & Edge

Home Page:https://pypi.org/project/webdrivermanager/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Cygwin as platform (alias for Windows)

rasjani opened this issue · comments

When trying to run webdrivermanager inside cygwin, platform is reported as "CYGWIN_NT*" and binary name lookup fails:

$ webdrivermanager chrome
Downloading WebDriver for browser: 'chrome'
Traceback (most recent call last):
  File "/usr/bin/webdrivermanager", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/webdrivermanager/cli.py", line 40, in main
    downloader = downloaders[browser](args.downloadpath, args.linkpath, args.os_name)
  File "/usr/lib/python2.7/site-packages/webdrivermanager/webdrivermanager.py", line 47, in __init__
    self.os_name = os_name or self.get_os_name()
  File "/usr/lib/python2.7/site-packages/webdrivermanager/webdrivermanager.py", line 80, in get_os_name
    return namelist[self.platform]
KeyError: 'CYGWIN_NT-10.0'

Eg, combine "self.os_name" and "self.platform" in webdrivermanager base class into a single value that harmonizes all variations into single platform identification ..

fixed in 0.7.1