Is there a way to enable a proxy on running Google Chrome (for example after I log in to my mail)?
Asked
Active
Viewed 1,640 times
1 Answers
-1
Yes this is possible:
PROXY = "proxy-here" # IP:PORT or HOST:PORT
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(chrome_options=chrome_options)
chrome.get("http://whatismyipaddress.com")

Anand
- 1,899
- 1
- 13
- 23
-
It's not working ... I am using the following code for C# `IWebDriver driverGC = new ChromeDriver(); driverGC.Navigate().GoToUrl("http://whatismyipaddress.com"); Thread.Sleep(5000); ChromeOptions options = new ChromeOptions(); var proxy = new Proxy(); proxy.HttpProxy = "71.54.128.150:47035"; options.Proxy = proxy; Thread.Sleep(5000); driverGC.Navigate().GoToUrl("http://whatismyipaddress.com"); Thread.Sleep(5000);` – Harold Martinez Mar 05 '18 at 16:20
-
I need to pass or exclude this `driverGC = new ChromeDriver();`, because it's loading a new chrome driver and it's not fetching the login details. – Harold Martinez Mar 05 '18 at 18:27