How to setup Selenium proxy with Java-TestNG?

How to setup Selenium proxy with Java-TestNG?

Hey Ian,

To setup Selenium proxy with Java-TestNG, you can refer to this sample code snippet below:

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.switches", Arrays.asList("--proxy-server=http://user:password@proxy.com:8080"));
WebDriver driver = new ChromeDriver(capabilities);