Tuesday, 2 April 2013

proxy url username password settings Selenium Java

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