python-chromedriver-autoinstaller
python-chromedriver-autoinstaller copied to clipboard
Download Path not fully respected
When I choose cwd=True the file should be downloaded to the cwd. But instead it's being downloaded to cwd/10x/chromedriver.exe
When I choose cwd=True the file should be downloaded to the cwd. But instead it's being downloaded to cwd/10x/chromedriver.exe
I strongly agree! The same problem occurs when you specify a path argument. For example chromedriver_autoinstaller.install(path="path/to/driver") will download chromedriver to "path/to/driver/10x/".
+1 to this being an issue. For what it's worth, the culprit is in utils.py. os.path.join is used to combine the specified path with an additional folder, named after the major version. While I understand how this can be useful, I feel like if the user wanted chromedriver to download into an subfolder, they would have specified that in their path. In my opinion, the path that chromedriver downloads into should be exactly what the user specified in the path parameter, no more, no less.
The current structure is designed to make it easier to see which version of ChromiumDriver is already installed, but I believe the comments here are valid. I'll see if I can improve it in a future version without breaking the interface.