title: Firefox keeps opening pdf in preview even when profile has the config to not do so, via python + selenium
body: <p>I'm trying to automatically save a file using python + selenium using firefox as a browser.</p>
  
  <p>The following code doesn't work as expected:</p>
  
  <pre><code>profile = webdriver.FirefoxProfile()
  profile.set_preference('browser.download.folderList', 2)
  profile.set_preference('browser.download.manager.showWhenStarting', False)
  profile.set_preference('browser.download.dir', './temp')
  profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'application/pdf,application/vnd.adobe.xfdf,application/vnd.fdf,application/vnd.adobe.xdp+xml')
  profile.set_preference("plugin.disable_full_page_plugin_for_types", "application/pdf,application/vnd.adobe.xfdf,application/vnd.fdf,application/vnd.adobe.xdp+xml")
  profile.set_preference("pdfjs.disabled", True)
  
  options = Options()
  options.add_argument("-headless")
  
  driver = webdriver.Firefox(profile, firefox_options=options)
  </code></pre>
  
  <p>Am I missing any parameter to inform Firefox to not preview the pdf file but rather download it? Firefox doesn't save the file and keeps opening the preview when I fire a click() in an object that points to a .pdf file.</p>
  
  <p>The Firefox version is 60.0.</p>
  
  <p>Example HTML:</p>
  
  <pre><code>&lt;a id=pdfdownload href="/some/path/somefile.pdf"&gt;LINK&lt;/a&gt;
  </code></pre>
  
  <p>python code:</p>
  
  <pre><code>obj = driver.find_element_by_id("pdfdownload")
  obj.click()
  </code></pre>
  
  <p>This is only an example, to display the way I'm interacting with the objects in screeen.</p>