Normally selenium referred the system proxy settings. If we want to use auto detect proxy setting from selenium code then we have to use different code like below
org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setAutodetect(true);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);
WebDriver driver5 = new FirefoxDriver(cap);
driver5.manage().window().maximize();
No comments:
Post a Comment