views:

243

answers:

2

We use Selenium to automate some tests on servers we have complete control of. I'd like to find a way to programmatically always allow mixed (SSL and non-SSL) content in web pages in IE, without IE prompting.

Is there an API for changing explorer settings beyond things like proxies? I certainly don't mind if it uses platform APIs via P/Invoke.

The OS is Server 2003 Data Centre Edition (running on Amazon EC2) and the version of IE ranges from IE6 to IE8.

We will eventually rebuild our base images, but it's a much larger job and I'd like to avoid that if possible. If I can change IE's settings from a .net app, even if it requires elevated permissions, that'd be perfect.

+2  A: 

I don't know of any specific API for the settings, but surely all of them are stored in the registry.

You can take a look here: http://support.microsoft.com/kb/182569

Hope this helps, Teodor.

Teodor
+2  A: 

You're looking for the registry setting for URLAction 0x1609, which is stored in the zone IDs (0-4) inside HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones.

The values are 0=Allow, 1=Prompt, 3=Deny.
http://msdn.microsoft.com/en-us/library/ms537183(VS.85).aspx

Note, however, that Mixed Content is a security risk, and sites containing this vulnerability should be fixed. http://blogs.msdn.com/ieinternals/archive/2009/06/22/9797918.aspx

EricLaw -MSFT-