title: setting proxy in selenium in python for Firefox Geckodriver
body: <p>My question is about setting proxy in selenium (3.4.3.) coding in python (2.7) for Firefox (Geckodriver v0.18.0-win64).
  The spec at
  <a href="http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp" rel="nofollow noreferrer">http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp</a>
  provides only a java example.</p>
  
  <pre><code>from selenium import webdriver
  PROXY = "94.56.171.137:8080"
  class Proxy(object):        
      def __call__(self):    
          self.base_url = "https://whatismyip.com"
          print self.base_url        
          # proxy json object
          desired_capability = webdriver.DesiredCapabilities.FIREFOX['proxy']={
             "httpProxy":PROXY,
              "ftpProxy":PROXY,
              "sslProxy":PROXY,
              #"noProxy":None,
              "proxyType":"manual"
          }    
          firefox_profile = webdriver.FirefoxProfile()
          firefox_profile.set_preference("browser.privatebrowsing.autostart", True)
          self.driver = webdriver.Firefox(executable_path='D:\Code\Drivers\geckodriver',firefox_profile=firefox_profile,  capabilities=desired_capability)         
          self.driver.get(self.base_url)    
  
  if __name__ == "__main__":        
      proxy_test = Proxy()
      proxy_test()
  </code></pre>
  
  <p>I am getting the following Error Message:</p>
  
  <blockquote>
    <p>selenium.common.exceptions.WebDriverException: Message: Can't load the
    profile. Possible firefox version mismatch. You must use GeckoDriver
    instead for Firefox 48+.</p>
  </blockquote>
  
  <p>If I comment the code regarding the proxy, I am able to get the page, in private mode as the profile specified. I think it is the proxy that is messing things up.</p>