Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

How can you redirect browsing from a browser through some proxy?

Category: Selenium WebDriver
String PROXY = "199.201.125.147:8080";
 
org.openqa.selenium.Proxy proxy = new.org.openqa.selenium.Proxy();
proxy.setHTTPProxy(Proxy)
 .setFtpProxy(Proxy)
 .setSslProxy(Proxy)
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);
WebDriver driver = new FirefoxDriver(cap);

Leave a Reply

Your email address will not be published. Required fields are marked *