how to set autoconfig.url python selenium

283 Views Asked by At

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");
1

There are 1 best solutions below

0
undetected Selenium On BEST ANSWER

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)