I use Selenium 2.35.0 and configure proxy settings like:
DesiredCapabilities cap = new DesiredCapabilities();
org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(proxyStr).setFtpProxy(proxyStr).setSslProxy(proxyStr);
cap.setCapability(CapabilityType.PROXY, proxy);
driver = new FirefoxDriver(firefox, profile, cap);
When I need to change proxy settings I force to restart webdriver and speify other "proxyStr".
How I can reach this changing without of webdriver restart?
RemoteWebDriver#getCapabilities()
and the castCapabilities
object it toDesiredCapabilities
and set your new proxy toDesiredCapabilities#setCapability
, load the url – Pesce