Reputation: 1825
I am using remote driver on VM Windows 8 32bits, so I used IEWebDriver for 32bits, and IE11 (Version: 11.0.9600.18053). Whenever I run test, it always goes to a random localhost URL and says :
This is the initial start page for the WebDriver server.
and from the test report it says:
org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Browser zoom level was set to 200%. It should be set to 100%
I have searched and tried a couple of solutions on here, but none of them worked:
Any other solutions please. Thanks
Upvotes: 1
Views: 11532
Reputation: 95
So in capybara framework written in Ruby this is how its solved instead of calling it capabilities or desired_capabilites( how every the case syntax your programming language desires) you need to call it options
According to https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities they are named desired capabilities, but when you examine them they are command line options (undocumented documentation). You will notice this when you make a driver with an options key as in key ,value pair and it complains about the type or missing the properties listed in the website link.
By enabling this you can run your tests at whichever IE Zoom level you please, 100% is not the correct zoom level for realtime webapps for IE its scaled to 150% as a quick fix to comply with the modern standard. So in addition do not create responsiveness around browser zoom levels, very bad ending
feel free to reach out
Capybara.register_driver :remote_chrome do |app|
a = Capybara::Selenium::Driver.new(app, {
:browser => :ie,
:options => Selenium::WebDriver::IE::Options.new({
:ignore_zoom_levels => true,
:ignore_zoom_setting => true,
:javascript_enabled => true
}),
})
end
Upvotes: 0
Reputation: 1
Enabled the same "Enable Protected Mode" for each zone Changed the zoom level to 100% by Control Panel/Display set to small (100%)
If after setting up all above mentioned if problem still exist ,check IE Driver Version and selenium webdriver version. if both are different its not going to work. Download latest version of both webdriver as well as IE Driver and try. It worked for me.
Upvotes: 0
Reputation: 27486
You've set the wrong zoom level. The zoom level in the Control Panel is a system-wide setting; you want the one for IE alone. Launch Internet Explorer manually, and on your keyboard, type Control+0 (zero). That's the keyboard shortcut for restoring the zoom level to 100%. Alternatively, you could choose the 100% zoom level from the menu, but I don't remember if that's available directly off the menus you see from the gear icon, or if you have to enable the full menu bar.
You could also set the ignoreZoomLevel
capability to false, but clicking on elements is likely to fail. The driver will be miscalculating the coordinates at which to click if the zoom level isn't properly set.
Upvotes: 4