public void setSslProxy(String proxyHost) { if (!StringUtils.equalsIgnoreCase(proxyHost, "none")) { proxy = new Proxy(); proxy.setSslProxy(proxyHost); capabilities.setCapability(CapabilityType.PROXY, proxy); } }
public static DesiredCapabilities getCapabilities() { // ---------- PROXY Capabilities -------------- org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy(); proxy.setSslProxy(proxyUrl + ":" + proxyPort); proxy.setFtpProxy(proxyUrl + ":" + proxyPort); proxy.setSocksUsername(""); proxy.setSocksPassword(""); DesiredCapabilities dc = DesiredCapabilities.firefox(); dc.setCapability(CapabilityType.PROXY, proxy); return dc; }
private Proxy proxy() { Proxy proxy; if (proxyEnabled) { proxy = new Proxy(); proxy.setProxyType(MANUAL); proxy.setHttpProxy(proxyDetails); proxy.setSslProxy(proxyDetails); } else { proxy = new Proxy(); proxy.setProxyType(Proxy.ProxyType.SYSTEM); proxy.isAutodetect(); } return proxy; }