title: Selenium give file name when downloading
body: <p>I am working with a selenium script where I am trying to download a Excel file and give it a specific name. This is my code:</p>
  
  <p>Is there anyway that I can give the file being downloaded a specific name ?</p>
  
  <p>Code:</p>
  
  <pre><code>#!/usr/bin/python
  from selenium import webdriver
  from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
  
  profile = FirefoxProfile()
  profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/plain, application/vnd.ms-excel, text/csv, text/comma-separated-values, application/octet-stream")
  profile.set_preference("browser.download.dir", "C:\\Downloads" )
  browser = webdriver.Firefox(firefox_profile=profile)
  
  browser.get('https://test.com/')
  browser.find_element_by_partial_link_text("Excel").click() # Download file
  </code></pre>