title: Selenium Chrome Options and Capabilities
body: <p>I'm trying to automatically download a file with selenium. To do so I would like to set the default download directory and disable the download prompt. It doesn't seem to be working and the options I'm passing don't even seem to be registering. Below is a sample of how I create the browser. Does anyone know what is going on?</p>
  
  <pre><code>chromedriver = 'PATH/TO/chromedriver'
  
  download_fp = './testPrismaDownload/'
  prefs = {
      "download.prompt_for_download" : False,
      "download.default_directory": download_fp
  }
  
  options = webdriver.ChromeOptions()
  options.binary_location = '/usr/bin/google-chrome-stable'
  options.add_argument('--headless')
  options.add_argument('--no-sandbox')
  options.add_argument('--disable-gpu')
  options.add_argument('--disable-setuid-sandbox')
  options.add_experimental_option('prefs', prefs)
  
  # i've tried various combinations of `options`, `chrome_options` (deprecated) and `desired_capabilities`
  browser = webdriver.Chrome(options=options, desired_capabilities=options.to_capabilities(), executable_path=chromedriver)
  </code></pre>
  
  <p>none of my specified options appear in <code>browser.capabilities</code> or <code>browser.desired_capabilities</code>. For example the key for chromeOptions in capabilities is <code>goog:chromeOptions': {'debuggerAddress': 'localhost:42911'}</code>.</p>
  
  <p>When I do <code>download_button.click()</code> the command succeeds but nothing downloads. I've also tried it on my mac laptop without the --headless option and when I click the download button the browser opens the download dialog prompting for download confirmation.</p>
  
  <p>Any help/experience would be greatly appreciated.</p>
  
  <p>Python 3.6.6 :: Anaconda, Inc.</p>
  
  <p>Selenium '3.141.0'</p>
  
  <p>Linux 9725a3ce7b7e 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux</p>