ChromeOption '--safebrowsing-disable-download-protection' doesn't disables the download warning in Chrome version 67.x ChromeOption '--safebrowsing-disable-download-protection' doesn't disables the download warning in Chrome version 67.x selenium selenium

ChromeOption '--safebrowsing-disable-download-protection' doesn't disables the download warning in Chrome version 67.x


As per your code trials as you are trying to implement --safebrowsing-disable-download-protection through ChromeOptions() but it is worth to mention the following points:

Conclusion

As per the points mentioned above the ChromeOption --safebrowsing-disable-download-protection is no more an effective/valid ChromeOption and should be handled by PVer4 by default for desktop platforms.


You can try this:

from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionschrome_options = Options()chrome_options.add_experimental_option("prefs", {  "download.default_directory": r"C:\Users\downloads",  "download.prompt_for_download": False,  "download.directory_upgrade": True,  "safebrowsing.enabled": False})driver = webdriver.Chrome(chrome_options=chrome_options)


This should work

    driver = webdriver.Chrome(chromeDriver, options=options)    params = {'behavior' : 'allow', 'downloadPath':r"C:\Users\downloads"}    driver.execute_cdp_cmd('Page.setDownloadBehavior', params)