if (!isProxySupported()) {
log.warn("No support proxy with {}. Please set proxy to browser configuration in advance.",
getClass().getSimpleName().replaceFirst("Factory$", ""));
return caps;
}
Proxy proxy = new Proxy();
proxy.setProxyType(ProxyType.MANUAL);
String ps = driverOptions.get(PROXY);
proxy.setHttpProxy(ps)
.setSslProxy(ps)
.setFtpProxy(ps);
if (driverOptions.has(NO_PROXY))
proxy.setNoProxy(driverOptions.get(NO_PROXY));
caps.setCapability(CapabilityType.PROXY, proxy);
}
return caps;
}