Wednesday, October 13, 2010

Selenium RC : Setting up a Firefox proxy

The normal way to use Selenium RC if your environment has a proxy installed is to use the command line e.g.

java -jar selenium-server.jar -Dhttp.proxyPort=8082

I could never quite get this to work.

I use the Firefox Profile Manager.

The command line is:

firefox -P

You need to do this from wherever Firefox is installed on your PC e.g.

x:\Program Files\Mozilla Firefox

When the "User Profile" box pops up, choose "Create Profile" and follow the wizard.

Run the command line again and select the new profile and then select "Start Firefox"

Configure Firefox to use a manual proxy:

Tools / Options / Advanced / Network / Settings

Configure the manual proxy to point to the proxy in your environment.

The Selenium RC command line you need to use this is:

java -jar selenium-server.jar -firefoxProfileTemplate "Path to profile created above"

GOTCHA: Remember to run the Profile manager again and select "default" to return to your normal profile otherwise any new changes will be mode to the wrong profile.



Anonymous said...

Thanks for this, helped me enormously!

Francisco said...

After hours and hours, even days, trying with -Dhttp.proxyHost= -
Dhttp.proxyPort=xxxx, your solution runs!!!

Thank you man * 1000! XD

Anonymous said...

It exists also for iexplore?

nzpcmad said...

I don't know of a Profile manager for IE.