Set IE driver proxy settings to use an automatic configuration script url (PAC)

784 views
Skip to first unread message

Seba

unread,
Nov 2, 2011, 4:46:54 PM11/2/11
to webdriver
Hi,

I need to dynamically configure the the proxy settings for an IE
driver to use a Proxy Auto-config url (PAC).
I managed to do it in Firefox this way:

fp = webdriver.FirefoxProfile()
fp.set_preference("network.proxy.type", 2)
fp.set_preference("network.proxy.autoconfig_url", "http://x.x.x.x/
proxy.pac")
driver = webdriver.Firefox(firefox_profile=fp)

However, I can't find any documentation that might help me to
implement it on an IE driver.
I guess this might be achieved via the
DesiredCapabilities.INTERNETEXPLORER['proxy'] dictionary, but I can't
find which is the key for the PAC url I should use and the right value
for "proxyType"

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

I was able to workaround this by directly writing the settings I want
in the windows registry (HKEY_CURRENT_USER\Software\Microsoft\Windows
\CurrentVersion\Internet Settings\AutoConfigURL)
But I would like to get it working through the IE webdriver
configuration.

Any clues?

Thanks!

Sebastian Tello

PeterJef...@hotmail.co.uk

unread,
Nov 3, 2011, 6:47:10 AM11/3/11
to webdriver
Hi

Please see Mark Collin's response comments on proxies on this earlier
thread:

http://groups.google.com/group/selenium-users/browse_thread/thread/a23ac77e192cf20b/c4bdaacc9efaa198?hl=en&lnk=gst&q=firefox+procy#c4bdaacc9efaa198

I think that answers your "proxy" question - it did mine!
Reply all
Reply to author
Forward
0 new messages