4

I am trying to set the proxy settings for internet explorer using selenium with python.

This is what i have done::

from selenium import webdriver

PROXY = "localhost:8080"

webdriver.DesiredCapabilities.INTERNETEXPLORER['proxy'] = {
    "httpProxy":PROXY,
    "ftpProxy":PROXY,
    "sslProxy":PROXY,
    "noProxy":None,
    "proxyType":"MANUAL",
    "class":"org.openqa.selenium.Proxy",
    "autodetect":False
}


driver = webdriver.Remote("http://localhost:4444/wd/hub",
webdriver.DesiredCapabilities.INTERNETEXPLORER)

The above snippet is provided in the documentation but when i used it to set the proxy i got an exception that :: target machine actively refused the connection.

Can anyone help me in setting the proxy for IE .

My purpose is :: i have to set the proxy in IE , open IE and test some things and then revert back IE to normal .

I am using python and selenium webdriver. How can i achieve this using them?

6
  • What version of the IEDriver are you using?
    – Arran
    Commented Aug 7, 2013 at 8:19
  • I am using selenium 2.26. It comes with iedriver . I am not using a separate IEDriverServer. However i tried using that also . I got the same issue. Commented Aug 8, 2013 at 5:28
  • You need to be using version 2.34. The IEDriver doesnt even have proxy support until then.
    – Arran
    Commented Aug 8, 2013 at 6:34
  • @Arran :: thanQ Aran, Commented Aug 26, 2013 at 11:16
  • ThanQ Aran, But selenium 2.34 doesnt come with IE driver right? I think i have to download separate IEDriver server. Will it be possible to do this using older versions of selenium? Commented Aug 26, 2013 at 11:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.