Home > Back-end >  how to set autoconfig.url python selenium
how to set autoconfig.url python selenium

Time:01-04

In Java i am able to set AutoConfigUrl like mentioned below,

how to do the same in python ?

Proxy proxy = new Proxy();
              
proxy.setProxyAutoconfigUrl("http://wpad/wpad.dat");

CodePudding user response:

Using Python and Selenium to set the proxyAutoconfigUrl you can use the following solution:

from selenium.webdriver.common.proxy import Proxy


prox = Proxy()
prox.proxyAutoconfigUrl = "http://wpad/wpad.dat"
capabilities = webdriver.DesiredCapabilities.CHROME.copy()
prox.add_to_capabilities(capabilities)
  • Related