title: Unable to set proxy :selenium.common.exceptions.WebDriverException:Access Denied
body: <p>I want to use Selenium Webdriver and I am unable to do so because when I run my code, I get the following exception.
  My code is very basic and as follows.</p>
  
  <pre><code>from selenium import webdriver
  driver = webdriver.Firefox()
  driver.get("http://www.google.com.bh")
  assert "Google" in driver.title
  driver.close()
  
  Exception Message
  selenium.common.exceptions.WebDriverException: Message: '&lt;HTML&gt;&lt;HEAD&gt;\n&lt;TITLE&gt;Access Denied&lt;/TITLE&gt;\n&lt;/HEAD&gt;\n&lt;BODY&gt;\n&lt;FONT face="Helvetica"&gt;\n&lt;big&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/big&gt;&lt;BR&gt;\n&lt;/FONT&gt;\n&lt;blockquote&gt;\n&lt;TABLE border=0 cellPadding=1 width="80%"&gt;\n&lt;TR&gt;&lt;TD&gt;\n&lt;FONT face="Helvetica"&gt;\n&lt;big&gt;Access Denied (authentication_failed)&lt;/big&gt;\n&lt;BR&gt;\n&lt;BR&gt;\n&lt;/FONT&gt;\n&lt;/TD&gt;&lt;/TR&gt;\n&lt;TR&gt;&lt;TD&gt;\n&lt;FONT face="Helvetica"&gt;\nYour credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.\n&lt;/FONT&gt;\n&lt;/TD&gt;&lt;/TR&gt;\n&lt;TR&gt;&lt;TD&gt;\n&lt;FONT face="Helvetica"&gt;\nThis is typically caused by an incorrect username and/or password, but could also be caused by network problems.\n&lt;/FONT&gt;\n&lt;/TD&gt;&lt;/TR&gt;\n&lt;TR&gt;&lt;TD&gt;\n&lt;FONT face="Helvetica" SIZE=2&gt;\n&lt;BR&gt;\nFor assistance, contact your network support team.\n&lt;/FONT&gt;\n&lt;/TD&gt;&lt;/TR&gt;\n&lt;/TABLE&gt;\n&lt;/blockquote&gt;\n&lt;/FONT&gt;\n&lt;/BODY&gt;&lt;/HTML&gt;\n' 
  </code></pre>
  
  <p>It opens firefox but after that it is unable to connect to google or any other local sites.
  The exception is at <code>driver = webdriver.Firefox()</code></p>
  
  <p>I googled  around and I followed the <a href="https://stackoverflow.com/questions/8342830/selenium-python-acess-denied-to-hub-session-when-launching-firefox-webdriver/8663979#8663979">link</a> on SO.</p>
  
  <p>But unfortunately I still get the same error.
  I cannot run as the root user. I changed my proxy settings and set No Proxy element for localhost as well as mentioned in the link.</p>
  
  <p>I am using Python 2.7 and have installed selenium 2.31  version.</p>
  
  <p>I also tried setting proxy.</p>
  
  <pre><code>myProxy = "*********:8080"
  proxy = Proxy({
      'proxyType': ProxyType.MANUAL,
      'httpProxy': myProxy,
      'ftpProxy': myProxy,
      'sslProxy': myProxy,
      'noProxy': 'localhost,127.0.0.1,*.abc' 
      })
  
  driver = webdriver.Firefox(proxy=proxy)
  </code></pre>
  
  <p>I also tried to set the proxy to system's proxy i.e., in the above code, <code>'proxyType': ProxyType.SYSTEM</code></p>
  
  <p>But it again gives the above exception message.
  is there a place where I have to set my username and password?</p>
  
  <p>Any help would be appreciated!</p>