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

Option for different path not respected #6

Closed HelioGuilherme66 closed 5 years ago

HelioGuilherme66 commented 5 years ago

On Windows 10 with Python 3.7.2 I used the -d option but it was ignored.

C:\Users\Helio>webdrivermanager -d C:\Selenium_Drivers chrome firefox edge
Downloading WebDriver for browser: 'chrome'
4524kb [00:01, 3345.68kb/s]
Driver binary downloaded to: C:\Selenium_Drivers\chrome\2.46\2.46%2Fchromedriver_win32\chromedriver.exe
Driver copied to: C:\Users\Helio\bin\chromedriver.exe
WARNING: Path 'C:\Users\Helio\bin' is not in the PATH environment variable.

Downloading WebDriver for browser: 'firefox'
4565kb [00:02, 1662.00kb/s]
Driver binary downloaded to: C:\Selenium_Drivers\gecko\v0.24.0\geckodriver-v0.24.0-win64\geckodriver.exe
Driver copied to: C:\Users\Helio\bin\geckodriver.exe
WARNING: Path 'C:\Users\Helio\bin' is not in the PATH environment variable.

Downloading WebDriver for browser: 'edge'
146kb [00:00, 1838.45kb/s]
Driver binary downloaded to: C:\Selenium_Drivers\edge\6\MicrosoftWebDriver\MicrosoftWebDriver.exe
Driver copied to: C:\Users\Helio\bin\MicrosoftWebDriver.exe
WARNING: Path 'C:\Users\Helio\bin' is not in the PATH environment variable.
rasjani commented 5 years ago

-d flag equals to root folder where drivers should be downloaded into. Here in your example, you provided a switch -d c:\Selenium_drivers and each webdriver was placed into c:\Selenium_drivers\ but with added $browserName, $driverVersion which is how it has been implemented (by original developer).

So, im wondering, are you thinking that the location if the download should not contain those sub folders or where you thinking of that the final driver binary not being what you specified (eg, c:\users\helio\bin) ?

rasjani commented 5 years ago

After having a talk with @HelioGuilherme66 - it looks like this is misunderstanding and bad documentation between what is the intent between -d and -l flags. I will update the docs to make things more clear and there's few code changes also in the pipeline that will hopefully help people regarding similar scenarios..

rasjani commented 5 years ago

Documentation will be addressed in next release and code changes already now in master - closing.