title: Selenium pdf automatic download not working
body: <p>I am new to selenium and I am writing a scraper to download pdf files automatically from a given site. </p>
  
  <p>Below is my code:</p>
  
  <pre><code>from selenium import webdriver
  
  fp = webdriver.FirefoxProfile()
  
  fp.set_preference("browser.download.folderList",2);
  fp.set_preference("browser.download.manager.showWhenStarting",False)
  fp.set_preference("browser.download.dir", "/home/jill/Downloads/Dinamalar")
  fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/pdf")
  
  browser = webdriver.Firefox(firefox_profile=fp)
  browser.get("http://epaper.dinamalar.com/PUBLICATIONS/DM/MADHURAI/2015/05/26/PagePrint//26_05_2015_001_b2b69fda315301809dda359a6d3d9689.pdf");
  webobj = browser.find_element_by_id("download").click();
  </code></pre>
  
  <p>I followed the steps mentioned in Selenium <a href="https://selenium-python.readthedocs.org/en/latest/faq.html?highlight=firefoxprofile" rel="noreferrer">documentation</a> and in the this <a href="http://software-testing-tutorials-automation.blogspot.in/2014/05/how-to-download-different-files-using.html." rel="noreferrer">link</a>. I am not sure why download dialog box is getting shown every time. </p>
  
  <p>Is there anyway to fix it else can there be a way to give "application/all" so that all the files can be downloaded (work-around)?</p>