I am using the latest version of Selenium (2.37.0) with C# in Internet Explorer 10 (using the latest 32-bit InternetExplorerDriver, 2.37.0) to log in to a webpage, click on
This is due to incorrect security settings in Internet Explorer. You need to clear the check box for Enable Protected Mode for each of the four zones in the Internet Options dialog Security tab. The four zones must match.
Manual Method:
Now your InternetExplorerDriver should show the correct number of window handles and be able to switch between windows.
In my case manual changes only lasted until I rebooted and then the settings reverted, so I recommend modifying the registry each test run to be sure.
C# Example Using Registry:
const string zonesPath =
@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\";
const string internetZonePath = zonesPath + "3";
const string restrictedZonePath = zonesPath + "4";
const string name = "2500";
const int value = 3;
Registry.SetValue(internetZonePath, name, value, RegistryValueKind.DWord);
Registry.SetValue(restrictedZonePath, name, value, RegistryValueKind.DWord);
The zones are:
The path to each zone is: "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\{zone number above}.
The name of the key is always "2500".
The value to turn off protected mode is "3".
To turn on protected mode set the value to "0".
In order to get all of the handles, all the zones must be set to the same value.