When you set a proxy for any given driver, it is set only at the time WebDriver session is created; it cannot be changed at runtime. Even if you get the capabilities of the created session, you won’t be able to change it. So the answer is, no, you must start a new session if you want to use different proxy settings.
More Related Contents:
- Selenium 2.53 not working on Firefox 47
- How to solve java.lang.NoClassDefFoundError? Selenium
- Syntax error on token “else”, delete this token [closed]
- Selenium – Basic Authentication via url
- How to convert a Hibernate proxy to a real entity object
- How can I ask the Selenium-WebDriver to wait for few seconds in Java?
- java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property
- Class has been compiled by a more recent version of the Java Environment
- How to select/get drop down option in Selenium 2
- Switch tabs using Selenium WebDriver with Java
- Cannot resolve constructor FirefoxDriver(org.openqa.selenium.firefox.FirefoxProfile)
- How to auto-download through Firefox browser using FirefoxProfile?
- How to select an item from a dropdown list using Selenium WebDriver with java?
- How to perform Mouse Wheel scrolling over HTML5 Canvas in Selenium?
- Run chrome browser in inconginto Mode in Selenium
- Chrome 59 and Basic Authentication with Selenium/Fluentlenium
- How to automate Google Home Page auto suggestion?
- Way to open Selenium browser not overlapping my current browser
- How to find the coordinates of the buttons on a canvas, and click on them after using Java and Selenium?
- How to resolve, Stale element exception? if element is no longer attached to the DOM?
- How to download a pdf file in chrome using selenium webdriver
- An HtmlUnit alternative for android?
- Using RestTemplate, how to send the request to a proxy first so I can use my junits with JMeter?
- How to scroll a specific DIV using Selenium WebDriver with Java?
- How do I get the underlying type of a proxy object in java?
- Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407” via https
- How to use an HTTP proxy in java
- How to wait for an alert in Selenium webdriver ? [duplicate]
- UnreachableBrowserException Caused by: java.lang.NullPointerException when “webdriver.firefox.marionette” is used
- How can I use an HTTP proxy for a JAX-WS request without setting a system-wide property?