Object proxy = new JsonParser().parse("{proxy:{" +
"proxyType:" + Proxy.ProxyType.MANUAL + "," +
"httpProxy:\"" + host + "\"," +
"httpProxyPort:" + port + "," +
"sslProxy:\"" + host + "\"," +
"sslProxyPort:" + port + "," +
"ftpProxy:\"" + host + "\"," +
"ftpProxyPort:" + port + "," +
"socksProxy:\"" + host + "\"," +
"socksProxyPort:" + port +
"}}").getAsJsonObject();
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("requiredCapabilities", proxy);
Prior to Selenium v3.x (ie. v2.x) I simply did:
capabilities.setCapability(CapabilityType.PROXY, org.openqa.selenium.Proxy);
Today I noticed with Selenium v3.3.1 and GeckoDriver v0.15.0 the proxy is not being set anymore in Firefox nor is there any error.
Selenium/GeckoDriver issues have been closed indicated all is resolved so I no longer need to do the "requiredCapabilities" hokie-pokie, but obviously I'm missed some important change that I need to make on my end.
Does anyone know what I need to change?
Thanks,
Kendall