Everything is in the title!
Is there a way to define the download directory for selenium-chromedriver used with python?
In spite of many research, I haven\'t fou
I have faced recently the same issue. Tried a lot of solutions found in the Internet, no one helped. So finally I came to this:
Modify Default/Preferences in newly created user-data-dir, add those fields to the root object (just an example):
"download": { "default_directory": "/tmp/tmpX7EADC.downloads", "directory_upgrade": true }
Launch chrome again with the same user-data-dir
Now it works just fine.
Another tip: If you don't know file name of file that is going to be downloaded, create snapshot (list of files) of downloads directory, then download the file and find its name by comparin snapshot and current list of files in the downloads directory.