I'm trying to download a file with selenium. I've searched everything.
At How to control the download of files with Selenium Python bindings in Chrome some people told that it worked. But it didn't worked for me! Maybe I miss something? The only things differentlly is that my page autostarted download the csv file.
After studying the chrome codes I added:
"safebrowsing_for_trusted_sources_enabled": False
But still id didn't worked.
options = Options()
options.add_argument("--disable-notifications")
options.add_argument('--no-sandbox')
options.add_experimental_option("prefs", {
"download.default_directory": "C:\\Users\\claudiu.ivanescu\\Downloads",
"download.prompt_for_download": False,
"download.directory_upgrade": True,
"safebrowsing_for_trusted_sources_enabled": False
})
options.add_argument('--disable-gpu')
options.add_argument('--disable-software-rasterizer')
options.add_argument('--headless')
Thank for support