Many times I have kicked off an automated test using InternetExplorerDriver() only for it to crash straight away as the zoom was not set to 100%. (Why is this required, it makes no sense to me). Internet ExplorerPreviously the only way I could get around this was to open a new window of Internet Explorer, reset the zoom to 100%, close the browser, reopen the browser again to verify the correct zoom. While this worked it wasn’t a very elegant solution.

Finally I found how to ignore the zoom level requirement and it is as simple as this when starting up your browser:
[code]
var IE_Options = new InternetExplorerOptions
{
IgnoreZoomLevel = true,
EnableNativeEvents = false
};
driver = new InternetExplorerDriver(IE_Options);
[/code]

This allows you to run your test without having to worry about what the zoom is currently set to.

Leave a Comment

Your email address will not be published. Required fields are marked *