The below code is working fine mix this code to your code
import org.openqa.selenium.Proxy.ProxyType;`
public static WebDriver dr = null;
org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setSslProxy("proxyurl"+":"+8080);
proxy.setFtpProxy("proxy url"+":"+8080);
proxy.setSocksUsername("SSSLL277");
proxy.setSocksPassword("password");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(CapabilityType.PROXY, proxy);
dr = new FirefoxDriver(dc);
No comments:
Post a Comment