Selenium ChromeDriver - Change Proxy after driver is instantiated

Viewed 260

I have a program that requires changing proxies quite often during requests. I am curious if there is a way I can change the proxy after the chrome driver has already been launched. Otherwise I would have to create a new instance and wait for that browser to launch every time I want too change the proxy. Currently the only way I know how to set the proxy is listed below.

    var options = new ChromeOptions();
    options.AddArgument(
       $"--proxy-server=http={proxy};https={proxy}");

    var driver = new ChromeDriver(options);
0 Answers
Related