"Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't.

Showing 1-15 of 15 messages
"Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/30/12 6:06 AM
Hello,
I've been using Selenium 2 for over a week now. At first i played around with this example from SeleniumHQ. I tried FirefoxDriver and InternetExplorerDriver and both worked fine. Now, i don't know what has changed, but when trying to run InternetExplorerDriver, i get this error:

Started InternetExplorerDriver server (64-bit)
2.25.2.0
Listening on port 14060
Exception in thread "main" org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Browser zoom level was set to 0%. It should be set to 100% (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.70 seconds
Build info: version: '2.24.1', revision: '17205', time: '2012-06-19 15:28:49'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_05'
Driver info: driver.version: InternetExplorerDriver
Session ID: 54d9b5eb-9b76-4e2d-b013-7ea05bcb13cc
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:155)
at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetExplorerDriver.java:114)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:54)
at org.openqa.selenium.example.Selenium2Example.testTest(Selenium2Example.java:40)
at org.openqa.selenium.example.Selenium2Example.main(Selenium2Example.java:14)

Naturally, i have checked and double-checked that i really do have zoom level set to 100%. I don't think you even can set it to 0%, so it seems that Selenium tries to check the zoom level but fails.
Has anyone else come across this?
RE: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Mark Collin 7/30/12 11:58 AM

I’m guessing your problem is:

 

Browser zoom level was set to 0%. It should be set to 100%

 

From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On Behalf Of Olav Kokovkin
Sent: 30 July 2012 14:07
To: webd...@googlegroups.com
Subject: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't.

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/LpYUIErpofcJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

RE: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Mark Collin 7/30/12 12:01 PM

OK I suffered a bit from tl;dr and fired early J

 

I’ve not seen this (but I haven’t tried 2.25.2 IEDriver server)

 

Does it work fine with the previous version?  If so you may have found a bug.

 

From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On Behalf Of Mark Collin
Sent: 30 July 2012 19:59
To: webd...@googlegroups.com
Subject: RE: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't.

 

I’m guessing your problem is:

 

Browser zoom level was set to 0%. It should be set to 100%

 

From: webd...@googlegroups.com [mailto:...@googlegroups.com] On Behalf Of Olav Kokovkin

Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/31/12 12:06 AM
No worries :)
I haven't checked earlier version yet, because i did get it working on  2.25.2 when i first tried it. But i'll try the older one, see how that works. Thanks.
- Olav
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Jim Evans 7/31/12 2:32 AM
I replied to this earlier, but my reply seems to have gotten eaten. Zoom detection is new in 2.25.2 of IEDriverServer.exe. To help us diagnose the problem, you can increase the logging level on the server (see other posts for examples of how to do this for IEDriverServer.exe). If you don't care about helping us fix it, you can pass the "ignoreZoomLevel" capability to the driver constructor (again, see other posts cot examples how to do this in your language binding).
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/31/12 4:21 AM
Hi,
Sorry, but i'll need a bit more help than that. Tried searching how to set logging level, but Eclipse doesn't show InternetExplorerDriverService.Builder to have any methods, so i don't know how to use the builder. Also, tried to set ignoreZoomLevel but the only InternetExplorerDriver constant i can find for setCapability(string, bool) is INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS. Could you elaborate?
Thanks!


On Tuesday, July 31, 2012 12:32:48 PM UTC+3, Jim Evans wrote:
I replied to this earlier, but my reply seems to have gotten eaten. Zoom detection is new in 2.25.2 of IEDriverServer.exe. To help us diagnose the problem, you can increase the logging level on the server (see other posts for examples of how to do this for IEDriverServer.exe). If you don't care about helping us fix it, you can pass the "ignoreZoomLevel" capability to the driver constructor (again, see other posts cot examples how to do this in your language binding).
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Jim Evans 7/31/12 4:42 AM
For setting the log file info, you can do something like:

InternetExplorerDriverService service = InternetExplorerDriverService.Builder()
    .usingAnyFreePort()
    .withLogFile(newFile("target/iedriver1.log"))
    .withLogLevel(InternetExplorerDriverLogLevel.TRACE)
    .build();

DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
WebDriver driver = new InternetExplorerDriver(service, caps);

To set the capability, the Java bindings may not have a constant defined, but you can use the string literal, like so:

caps.setCapability("ignoreZoomLevel", true);

Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/31/12 5:09 AM
Nope, still:
1. The method Builder() is undefined for the type InternetExplorerDriverService
2. The constructor InternetExplorerDriver(InternetExplorerDriverService, DesiredCapabilities) is undefined
3. After only setting  ignoreZoomLevel to true and using the InternetExplorerDriver(DesiredCapabilities) constructor, i STILL get the "Browser zoom level was set to 0%. It should be set to 100%" error message
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/31/12 5:16 AM
To clarify, this is how i'm constructing my driver now:
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability("ignoreZoomLevel", true);
driver = new InternetExplorerDriver(caps);
And i still get the 0% zoom error.
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Jim Evans 7/31/12 5:49 AM
Sorry, the capability is actually "ignoreZoomSetting". I was on a mobile device when I wrote that, and was doing it from memory.

I'm not normally a user of the binary distributions of the language bindings, preferring to build from source. I'm quite sure those methods are available on the object returned by the Builder() method and that the constructor I've referenced are available in the current sources. I have no idea if their available in the latest packaged release; they will be available for certain in the next packaged release.

--Jim
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 7/31/12 5:52 AM
Yeah, thanks, that did it! Can't help you with the logs though. Sorry :(
- Olav
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. wonuto 10/30/12 4:25 PM
Olav - were you able to fix this issue? I am getting following error:
 
Cannot convert from 'OpenQA.Selenium.Remote.DesiredCapabilities' to 'OpenQA.Selenium.IE.InternetExplorerOptions' 
 
And this is how I constructing driver:
 
DesiredCapabilities caps = DesiredCapabilities.InternetExplorer();
caps.setCapability("ignoreZoomSetting", true);
driver = new InternetExplorerDriver(caps);
~
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Olav Kokovkin 10/31/12 6:17 AM
Hi,
Yeah, sorry, that's the same way I did it. I'm kinda busy now, and that was a few months ago, so i can't help you much more, but looking at my source, this is how i did it:
 
WebDriver driver; 
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();

caps.setCapability("ignoreZoomSetting", true);
driver = new InternetExplorerDriver(caps);

Ok i also ran that script, and it works for me. The only difference i can see, is that your .InternetExplorer() starts with a capital letter, mine is .internetExplorer()

Hope that helps :)
Re: [webdriver] "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Jim Evans 10/31/12 7:39 AM
You're using the .NET bindings. That means you need to use the InternetExplorerOptions class, like this:

InternetExplorerOptions options = new InternetExplorerOptions();
options.IgnoreZoomLevel = true;
IWebDriver driver = new InternetExplorerDriver(options);
Re: "Unexpected error launching Internet Explorer. Browser zoom level was set to 0%." Except it isn't. Duncan Lawrence 11/13/13 9:27 AM
This how I did this

InternetExplorerOptions ieo = new InternetExplorerOptions 
                        { IgnoreZoomLevel = true };
var driver = new InternetExplorerDriver(ieo));

works great!