How to configure proxy in Selenium?

  1. Configure http.proxyHost, http.proxyPort, http.proxyUser and http.proxyPassword using the following command:
    $ java -jar selenium-server-standalone-.jar -Dhttp.proxyHost=proxy.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=username -Dhttp.proxyPassword=password
  2. Replace the Hostname, port, username and password of the proxy server you want to connect to.