0

I am trying to download files from website using selenium and chrome webdriver in python and i am getting the alert to keep or discard. I have tried every way as mentioned on stackoverflow to change the chrome option and preferences, but of no use.

Thanks in Advance

1 Answers1

0

Have you tried this?

chromeOptions = webdriver.ChromeOptions()
  prefs = {'safebrowsing.enabled': 'false'}
  chromeOptions.add_experimental_option("prefs", prefs)
  driver = webdriver.Chrome(chrome_options=chromeOptions)
Amruta
  • 1,128
  • 1
  • 9
  • 19
  • Yes...I have tried these things preferences = {"download.default_directory": download_dir, "download.prompt_for_download": False, "profile.default_content_settings.popups": 0, "download.extensions_to_open": 'inf', "download.extensions_to_open": 'cfg', "safebrowsing.enabled": True, "profile.default_content_setting_values.automatic_downloads": 1} @Amruta – user11576702 Dec 03 '19 at 05:07