I am trying to run my selenium java code to test a webpage. But webpage is not loading because of network restrictions. When I set the proxy manually and hit the url in browser
Passing a Capabilities object to the ChromeDriver() constructor is deprecated. One way to use a proxy is this:
String proxy = "127.0.0.1:5000"; ChromeOptions options = new ChromeOptions().addArguments("--proxy-server=http://" + proxy); WebDriver webDriver = new ChromeDriver(options);