InternetExplorerDriver Zoom Level Error

selenium, selenium-webdriver, webdriver

Solution

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);

Problem

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?

Original source