SeleniumBasic icon indicating copy to clipboard operation
SeleniumBasic copied to clipboard

Issue using proxy

Open Ulixestoitaca opened this issue 8 years ago • 1 comments

Hello! I am trying to use proxies by selenium driver but it returns an error, this is the code (it is in vbs just for have a fast try)

Set driver = CreateObject("Selenium.IEDriver") driver.Start driver.setProxy "172.245.193.111:80" driver.Get "http://whatismyipaddress.com/" WScript.Echo "Click OK to quit" driver.Quit

here the result:

immagine

Ulixestoitaca avatar Dec 09 '17 02:12 Ulixestoitaca

Hello again, I have solved by myself by the following code

Set driver = CreateObject("Selenium.IEDriver") driver.Start driver.Proxy.SetHttpProxy "209.54.173.11:80" driver.Get "http://whatismyipaddress.com/" driver.Quit

I wonder now how and if is possible to switch proxy in runtime, without closing and reopening the browser window.

Many thanks!

Ulixestoitaca avatar Dec 09 '17 05:12 Ulixestoitaca