I am using this code to automate a flow which will download a Winzip file without prompt.
But it does not seem to work
profile = webdriver.firefox.firefox_profile.FirefoxProfile()
profile.set_preference('browser.helperApps.neverAsk.saveToDisk',("application/zip,
application/octet-stream"))
profile.set_preference('browser.download.folderList', 2)
profile.set_preference('browser.download.dir', '/home/jack/DOWNLOAD')
self.driver = webdriver.Firefox(firefox_profile=profile)
I still see the dialog box being opened while automation.
I solved this situation by extracting the
hrefof the download link and using the pythonurllibmodule.Using the below code, one can download the file and save it in a different file name as well.