Firefox 47 and above do not support Selenium Webdriver. I tried to use a Marionette driver to start my tests via Firefox.
But my settings in firefox-profile (proxy must set to network.proxy.type = 4
, auto-detect) is no longer applied to Firefox config (Firefox opens but all settings set by default) and my tests do not work without the right PROXY configuration.
How can I setup proxy in Firefox browser via a Marionette driver?
The old tricks with firefoxProfile or Proxy class do not work any more. All you have to do is pass through requiredCapabilities a JSON with the new Marionette proxy format:
No more "proxyHost:proxyPort" format, but httpProxy=host, httpProxyPort=port.
Here is all the code:
import java.io.IOException;
https://github.com/SeleniumHQ/selenium/issues/2963
https://github.com/mozilla/geckodriver/issues/97#issuecomment-255386464