title: Cannot suppress the OS download file window even after setting browser preference through webdriver+python
body: <p>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 <strong>download a pdf file</strong>. I have set the browser preferences but despite that fact, it does not suppress the OS window.</p>
  
  <p>Here is the code snippet that I have written:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>I am using Ubuntu 12.10, Firefox, webdriver, python</p>