I know this question has been asked before but after trying suggestions, I am constantly getting the OS download file window. What I am trying to do is download a pdf file. I have set the browser preferences but despite that fact, it does not suppress the OS window.
Here is the code snippet that I have written:
firefoxProfile = webdriver.FirefoxProfile()
firefoxProfile.set_preference('browser.download.folderList', 2)
firefoxProfile.set_preference('browser.download.manager.showWhenStarting', False)
firefoxProfile.set_preference('browser.download.dir', '/media/pinku/Pinku')
firefoxProfile.set_preference('browser.helperApps.alwaysAsk.force', False)
firefoxProfile.set_preference('browser.helperApps.neverAsk.saveToDisk',
'application/octet-stream')
self.driver = webdriver.Firefox(firefoxProfile)
I am using Ubuntu 12.10, Firefox, webdriver, python