using System;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium;
namespace CSharpAutomationFramework.Tests
{
public class Browse
While working with Selenium 3.x, IEDriverServer 3.x and Internet Explorer you can't ignore Zoom Levels and Protective Mode settings.
If you look into the Required Configuration of Internet Explorer Driver the following points are clearly mentioned :
On Internet Explorer 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings you have to choose "Internet Options" from the "Tools" menu and then click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled Enable Protected Mode.
@JimEvans in his article You're Doing It Wrong: IE Protected Mode and WebDriver clearly mentions :
Using the capability doesn't solve the underlying problem though. If a Protected Mode boundary is crossed, very unexpected behavior including hangs, element location not working, and clicks not being propagated, could result. To help warn people of this potential problem, the capability was given big scary-sounding names like
INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS
in Java andIntroduceInstabilityByIgnoringProtectedModeSettings
in .NET. We really thought that telling the user that using this setting would introduce potential badness in their code would discourage its use, but it turned out not to be so.
The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
As per the Required Configuration of Internet Explorer Driver :