Forums

Selenium with Chromedriver doesn't download files

Hi! i have a question. Selenium was working fine downloading files for almost 5 months, but recently it start doesn't downloading files to my folder, Need help please!

I tried chrome_options.add_experimental_option( "prefs", { "download.default_directory": "/home/clau2020/Downloads" } but nothing happened

If it has recently stopped, make sure that the site that you're downloading from hasn't changed in a way that is causing the downloads to fail.

I'm sure it works because i tried mannually and Google Colab

What error do you get?

There is no error, it just doesn't download the file that before does

Try adding code to do a snapshot of the page that you're getting when you expect the download to happen; perhaps the site will tell you what the problem is there. If your Selenium webdriver is in a variable called browser, then the code to do a snapshot looks like this:

browser.get_screenshot_as_file(filename)

...where filename is something like "mysnapshot.png".