title: Python Set Firefox Preferences for Selenium--Download Location
body: <p>I use Selenium Marrionette and GeckoDriver to pull web data. I use the following to set my Firefox profile preferences:</p>
  
  <pre><code>fp = webdriver.FirefoxProfile()
  fp.set_preference("browser.download.folderList", 1)
  fp.set_preference("browser.helperApps.alwaysAsk.force", False)
  fp.set_preference("browser.download.manager.showWhenStarting",False)
  fp.set_preference("browser.download.dir", "H:\Downloads")
  fp.set_preference("browser.download.downloadDir","H:\Downloads")
  fp.set_preference("browser.download.defaultFolder","H:\Downloads")
  
  binary = FirefoxBinary(r'C:\Program Files (x86)\Mozilla Firefox\Firefox.exe')
  
  firefox_capabilities = DesiredCapabilities.FIREFOX
  firefox_capabilities['marionette'] = True
  
  driver = webdriver.Firefox(capabilities=firefox_capabilities, firefox_binary=binary, firefox_profile = fp)
  </code></pre>
  
  <p>From what I understand after reading <a href="https://github.com/mozilla/geckodriver/issues/236" rel="noreferrer">Unable to set firefox profile preferences</a> and <a href="https://github.com/SeleniumHQ/selenium/issues/2572" rel="noreferrer">FirefoxProfile passed to FirefoxDriver</a>, it seems that nothing is being done when using <code>firefox_profile</code> now. So I need to implement the new updates to <code>firefox_capabilities</code>, but I'm not sure how to exactly do that. Any ideas?</p>