How to change Firefox web driver proxy settings at runtime?

后端 未结 1 1259
抹茶落季
抹茶落季 2020-12-06 13:21

I use Selenium 2.35.0 and configure proxy settings like:

DesiredCapabilities cap = new DesiredCapabilities();
org.openqa.selenium.Proxy proxy = new org.openq         


        
相关标签:
1条回答
  • 2020-12-06 14:21

    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.

    0 讨论(0)
提交回复
热议问题