title: Issues downloading file using Selenium + Firefox
body: <p>So, i have been trying to download .csv files using Firefox and Selenium with Python but no luck until now.</p>
  
  <p>Basically i am iterating through a select box and filtering it, for each filter i want to download the corresponding .csv file and then continue with the next one.</p>
  
  <p>I can't seem to get this working for one city or all of them.</p>
  
  <p>I read other questions on SO but nothing seems to work for my case.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>def download_csv(self, path=management/):
      profile = webdriver.FirefoxProfile()
      profile.set_preference("browser.download.folderList", 2)
      profile.set_preference("browser.download.manager.showWhenStarting",
                             False)
      profile.set_preference("browser.download.dir", '/tmp')
      profile.set_preference("browser.helperApps.neverAsk.saveToDisk",
                             "text/csv")
  
      display = Display(visible=0, size=(1024, 768))
      display.start()
      driver = webdriver.Firefox(profile)
      driver.maximize_window()
  
      url = 'https://rnt.turismodeportugal.pt/RNAL/ConsultaRegisto.aspx' \
            '?Origem=CP&amp;FiltroVisivel=True'
      driver.get(url)
  
      select_options = []
  
      select = driver.find_element_by_css_selector('#wt32')
      for option in select.find_elements_by_tag_name('option'):
          if option.text != 'Todos' and option.text != '':
              select_options.append(option.text)
  
      print (len(select_options))
  
      for option in select_options:
          driver.get(url)
          select = Select(driver.find_element_by_id('wt32'))
          print (option)
          select.select_by_visible_text(option)
          search = driver.find_element_by_css_selector('#wt10')
          search.click()
          print(driver.find_element_by_css_selector('.Counter_Message').text)
  
          download = driver.find_element_by_css_selector('#wt84')
          download.click()
  
          print ('***********')
  
      driver.quit()
  </code></pre>
  
  <p>With this code i run into a </p>
  
  <pre><code>selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: A exportação da informação para excel poderá demorar alguns minutos. Confirma Exportar dados?
  Message: Unexpected modal dialog (text: A exportação da informação para excel poderá demorar alguns minutos. Confirma Exportar dados?)
  </code></pre>
  
  <p>error.</p>
  
  <p>Any ideas?</p>