Pages

IEDriver - How To Resolve Set IE browser Zoom Level To 100% Error On RunTime

If your IE browser zoom level Is not set to 100% then you will get an error like "Browser zoom level was set to XYZ%. It should be set to 100%". Earlier we learnt In THIS POST -> How to resolve this error by setting IE browser's zoom level to 100% manually before running software test automation script. Now If you need

to run your software test script In different computers then everywhere you need to set browser's zoom level every time manually before running your software web application's test script. Otherwise your software automation test script will fail.

As described In my previous post, We can resolve "Enable Protected Mode For All Zones" error run-time. So can we do same thing for browser zoom level? Answer Is Yes. We can apply some extra code In our software automation test script to set browser zoom level 100% run-time automatically.

Here we will use same class DesiredCapabilities of WebDriver Interface which we have used In previous post to resolve error. Here we will set browser's capability to Ignore zoom setting and disable the native events. Then we will set browser zoom level to 100%. Bellow given code snippet will perform above given all operations and set browser zoom level 100%.

Above test will be executed without any error. This Is the best way to resolve Set IE browser Zoom Level To 100% error. It will apply zoom level settings automatically on each machine where this software test script will be executed. So you no need to worry about It. Next post will show you how to handle SSL certificate error in IE browser.