title: Download excel.xlsx file with firefox bypassing popup : Selenium Python
body: <p>I´ve trying to download a Excel.xlsx file from a website using selenium for pyhton and I keep getting the save/open pop up even when I changed the preferences.
  IF you guys can help me, would be awesome.</p>
  <p>This is the setting modification section.</p>
  <pre><code>def __firefox_driver(download_dir):fp = webdriver.FirefoxProfile()
      fp.set_preference(&quot;browser.download.folderList&quot;, 2)
      fp.set_preference(&quot;browser.helperApps.alwaysAsk.force&quot;, False)
      fp.set_preference(&quot;browser.download.manager.showWhenStarting&quot;, False)
      fp.set_preference(&quot;browser.download.manager.showAlertOnComplete&quot;, False)
      fp.set_preference(&quot;browser.helperApps.neverAsk.saveToDisk&quot;,&quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot;)
      fp.set_preference(&quot;browser.download.lastDir&quot;, download_dir)
      return webdriver.Firefox(firefox_profile=fp, executable_path=r&quot;C:/geckodriver.exe&quot;)
   
  driver =__firefox_driver(&quot;C:\\Downloads&quot;)
  driver.get(url)
  </code></pre>
  <p>Thank you guys a lot.</p>