Search code examples
seleniumautomationhttp-proxyproxy-server

How do I overcome the Proxy server in selenium webdriver


I am using the proxy server in my system, When I try to open a URL through selenium web driver the Browser starts but the URL is not passed in the address bar.

How to overcome the proxy server setup?

I have tried with the following code

Code:

    FirefoxProfile profile = new FirefoxProfile();

    profile.setPreference("network.proxy.type", 1);
    profile.setPreference("network.proxy.http", "172.16.13.13");
    profile.setPreference("network.proxy.http_port", 8080);

    WebDriver driver = new FirefoxDriver(profile);

    driver.get("http://www.gmail.com");

What is the solution to overcome ?


Solution

  • Actually I downloaded the latest version of selenium from the http://www.seleniumhq.org/download/ website.

    Then added those jars to the external libraries. It is working fine now.