I'm trying to run tests against IE8 but I've encountered a strange issue:
When creating the webdriver instance (driver = Selenium::WebDriver.for :ie), IE starts up and an exception is thrown by WebDriver:
"Unexpected error launching Internet Explorer. Browser zoom level was set to 0%"
IE seems to show a failure to connect to the IE Driver Server but if I refresh the browser manually, it connects just fine.
I have checked online and only two other people seem to have reported this. One possible solution was to ensure that all zones have the same "protected mode" settings, which they do.
My environment is Windows 7 and IE8 with IE Driver Server v2.25.3 and I'm using the Ruby bindings.
Any ideas?
In this article, I will show you two methods on how to Zoom In and Zoom Out in Selenium WebDriver. Manually, we have to press CTRL+ADD to do Zoom In and we have to press CTRL+SUBTRACT to do zoom out.
In Internet Explorer, on the View menu, point to Zoom, and then select a different level. If you have a mouse with a wheel, hold down the Ctrl key, and then scroll the wheel to zoom in or out. If you click the Change Zoom Level ( ) button, it cycles through 100%, 125%, and 150%.
According to the answer given by Jim Evans (one of Selenium developers) in this thread at WebDriver User Group the code below should fix your problem.
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability("ignoreZoomSetting", true);
driver = new InternetExplorerDriver(caps);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With