title: python : disable download popup when using firefox with selenium
body: <p>I have script that using selenium and firefox to automating download action. 
  The problem is whenever I run script I always get pop up from firefox keep asking what kinds of action I would like to do, even though I set download path in firefox preference. I checked files and folders to create master mimeTypes.rdf for all users, but I couldn't find mine.(I'm using ubuntu). I found ~/.mozilla/firefox but there was no file for directory of my profile name nor any file has an extension like .rdf</p>
  
  <p>here is the criminal's pic that making me crazy</p>
  
  <p><a href="https://i.stack.imgur.com/B01NH.jpg" rel="nofollow noreferrer">firefox download popup</a></p>
  
  <p>below is what I've done to disable the popup.</p>
  
  <pre><code>profile = FirefoxProfile()
  profile.set_preference("browser.download.panel.shown", False)
  profile.set_preference("browser.helperApps.neverAsk.openFile", 'application/zip')
  profile.set_preference("browser.helperApps.neverAsk.saveToDisk", 'application/zip')
  profile.set_preference("browser.download.folderList", 2)
  profile.set_preference("browser.download.dir", "/home/i-06/Downloads")
  driver = webdriver.Firefox(firefox_profile=profile)
  </code></pre>