title: can't download .XLS file from url using selenium python. Always end up with Firefox download popup
body: <p>I have tried various methods but I'm unable to download excel file. I always end up with the firefox popup staring at me. any Idea how to get this working</p>
  
  <pre><code>    import time
      from selenium import webdriver
      from selenium.webdriver.support.ui import WebDriverWait
      from selenium.webdriver.common.by import By
      from selenium.webdriver.support import expected_conditions as EC
  
      profile = webdriver.FirefoxProfile()
      profile.set_preference('browser.download.folderList', 2) # customlocation
      profile.set_preference('browser.download.dir','/home/rahul')
      profile.set_preference('browser.download.manager.showWhenStarting', False)
      profile.set_preference('browser.download.panel.shown', False)
      profile.set_preference('browser.helperApps.neverAsk.saveToDisk','application/vnd.ms-excel, application/vnd.ms-excel.addin.macroenabled.12,application/vnd.ms-excel.sheet.binary.macroenabled.12,application/vnd.ms-excel.template.macroenabled.12,application/vnd.ms-excel.sheet.macroenabled.12,application/octet-stream')
      profile.set_preference("browser.helperApps.alwaysAsk.force", False)
      profile.set_preference("browser.download.manager.alertOnEXEOpen", False)
      profile.set_preference("browser.download.manager.focusWhenStarting", False)
      profile.set_preference("browser.download.manager.useWindow", False)
      profile.set_preference("browser.download.manager.showAlertOnComplete", False)
      profile.set_preference("browser.download.manager.closeWhenDone", False)
      driver = webdriver.Firefox(profile)
      driver.get('any_url')
      driver.wait = WebDriverWait(driver, 5)
      time.sleep(5)
      export = driver.wait.until(EC.element_to_be_clickable((By.ID, "ExportSpn"))).click()
      time.sleep(5)
      driver.quit()
  </code></pre>