title: Setting chromedriver proxy auth with Selenium using Python
body: <p>I am coding a test suite using Python and the Selenium library. Using the chromedriver, I am setting proxies using:</p>
  
  <pre><code>chrome_options = webdriver.ChromeOptions()
  chrome_options.add_argument('--proxy-server=%s' % hostname + ":" + port)
  global driver
  driver = webdriver.Chrome(chrome_options=chrome_options)
  </code></pre>
  
  <p>This works fine when the proxy does not have authentication. However, if the proxy requires you to <strong>login with a username and password</strong> it will not work. What is the correct and proper way to pass proxy authentication information to the chromedriver using add_argument or other methods?</p>
  
  <p>It is not the same as: <a href="https://stackoverflow.com/questions/19225507/how-to-set-proxy-setting-for-chrome-in-selenium-java">How to set Proxy setting for Chrome in Selenium Java</a></p>
  
  <p>Seeing as:</p>
  
  <ol>
  <li>I ts a different language</li>
  <li>Its firefox, not chrome.</li>
  <li>--proxy-server=<a href="http://user:password@proxy.com:8080" rel="noreferrer">http://user:password@proxy.com:8080</a> does not work.</li>
  </ol>