Python Selenium Chrome disable prompt for "Trying to download multiple files"
Did you try passing the according preference to webdriver
?
import osfrom selenium import webdriverfrom selenium.webdriver.chrome.options import Optionschromedriver = "path/to/chromedriver"os.environ["webdriver.chrome.driver"] = chromedriverchrome_options = Options()# this is the preference we're passingprefs = {'profile.default_content_setting_values.automatic_downloads': 1}chrome_options.add_experimental_option("prefs", prefs)driver = webdriver.Chrome(chrome_options=chrome_options)# just downloading some files...for _ in range(5): driver.get("http://code.jquery.com/jquery-1.11.3.min.map")driver.quit()
The only 2 prefs I've ever had to set are:
download.prompt_for_download = Falsedownload.default_directory = "/path/to/folder/"