1

I have problem to set up the proxy for Firefox used by Selenium. The firefox installation is default (v 14.0.1, %programfiles%/mozilla firefox/). I started firefox with default profile and set up the proxy (i need either no proxy or manual proxy with one exception). the site to be tested is reachable. (with default proxy setting the site is not reachable)

I started the default selenium node

java -jar selenium-server-standalone-2.24.1.jar -role node  -hub http://localhost:4444/grid/register

If i start the selenium test ff opens, url is entered but now i get proxy error. If i interrupt the test and check the settings: proxy is back to default. in "about:config" i can see that not all settings are default, it seems that WebDriver has set some things (updates off and such).

So my next approach was to set the node with:

-firefoxProfileTemplate <my default profile folder>

but with no success - it seems selenium ignores is completly. Setting up a different profile doesn't work either.

So how to get my special proxy settings to be used by firefox? (i also tried it without grid, running the tests with a local firefox - same problem)

Withe the trick from here i could see the active profile: "anonymous3433195750899294958webdriver-profile" it is possible to let webdriver not use this?

Update: the only thing that seem to work is to set proxy in java:

DesiredCapabilities FF = DesiredCapabilities.firefox();
Proxy proxy = new Proxy();
proxy.setProxyType(ProxyType.DIRECT);
FF.setCapability(CapabilityType.PROXY, proxy);

But this hardcoded solution is no option in long run, i need environment independent code and besides that i want to know whats going on.

dermoritz
  • 12,519
  • 25
  • 97
  • 185
  • I've got a similar problem [here](http://code.google.com/p/selenium/issues/detail?id=3354) – Franz Ebner Jul 20 '12 at 09:34
  • possible duplicate of [How Does One Indicate the Firefox Profile With RemoteWebDriver](http://stackoverflow.com/questions/4379456/how-does-one-indicate-the-firefox-profile-with-remotewebdriver) – Andreas Panagiotidis Nov 21 '13 at 14:12

1 Answers1

5

You can assign to each Selenium grid 2 node a specific firefox profile, just set the webdriver.firefox.profile property:

java -jar selenium-server-standalone-2.37.0.jar -Dwebdriver.firefox.profile=my-profile -role node -hub http://mydomain.com:4444/grid/register

  • The value of the webdriver.firefox.profile has to be the firefox profile name, not the location or the folder name

http://automatictester.wordpress.com/2013/04/07/selenium-running-custom-firefox-profile/

Andreas Panagiotidis
  • 2,763
  • 35
  • 32