How to configure selenium-server to use a proxy server from Eclipse

By : Samo

When I run my Selenium tests from Selenium-IDE everything works fine, but when I export this test to Java and run it as a JUnit test from Eclipse, I get a timeout when trying to retrieve jQuery from googleapis.

I believe this is because selenium-server overrides my proxy settings when I run it this way. I have seen some suggestions as to how to configure Selenium to use a proxy server when running from the command line, so I tried to apply this to Eclipse. I right-click on selenium-server.jar, Run As -> Run Configurations..., click on the (x)=Arguments tab, and add this to Program arguments:

But this still doesn't work. Can anyone suggest how to configure SeleniumServer to use my proxy when running from Eclipse? Thanks!


I have also tried putting these arguments in the VM Arguments section, but with no results. I have officially earned the Tumbleweed badge for this question... Surely *somebody* has a suggestion!

By : Samo

Try setting the system properties for these as in

System.setProperty(key, value)


System.setProperty("http.proxyHost", "");
System.setProperty("http.proxyPort", "80");

This video can help you solving your question :)
By: admin