3

I'm using the following code to set a proxy for chromedriver:

from selenium.webdriver.chrome.options import Options as options
ops = options()
ops.add_argument('--proxy-server=PROXY:PORT')
browser1 = selenium.webdriver.Chrome(service_log_path='NUL', executable_path=info['location'] + '//Variables//Common//Browsers//chromedriver.exe', options=ops, desired_capabilities={'binary_location': 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe'})

Is there a way to change the proxy without reopening the browser?

MBT
  • 21,733
  • 19
  • 84
  • 102
Rhys
  • 4,926
  • 14
  • 41
  • 64

0 Answers0