Some of the teams are using IE for which we added ie capabilities including the one specified below:
cap.setCapability("ignoreZoomSetting", true);
Now if my zoom is set to 100%, I don't face any issues with execution. But in case my zoom setting is set to anything other than 100%, this capability helps opening up the browser but my test case fails because it's unable to find the required objects on the page. Is there any way, we can change the zoom level to 100% while opening up the browser or any other thoughts on how to handle this situation?
As per the Required Configuration for InternetExplorerDriver:
The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
Additionally,
For Windows 10, you also need to set "Change the size of text, apps, and other items" to 100% in display settings.
So while using InternetExplorerDriver
and InternetExplorer
you need to configure the following:
cap.setCapability("ignoreZoomSetting", true);
cap.setCapability("requireWindowFocus", false);
cap.setCapability("nativeEvents", false);
You can find a couple of relevant discussions in:
So setting these capabilities are part of best practices and incase with these configurations the browser initialization is having issue that needs detailed analysis.
However, at this point it's worth to mention that:
On IE 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, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
You can find a couple of relevant discussions in:
A couple of related discussions: