My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1795: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value
27 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Sep 2011


Sign in to add a comment
 
Reported by nsa.lum...@gmail.com, Jun 8, 2011
Using Selenium 2.0rc2, I'm seeing the following exception when trying to run tests using IE:

Caused by: org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_25'
Driver info: driver.version: InternetExplorerDriver
	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:131)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:103)
	at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetExplorerDriver.java:104)
	at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:61)

It looks like protected mode is set in IE on my machine via a corporate group policy that I'm not a part of and therefore not able to change.  I have a feeling I'm likely not the only one out there under this restriction, and fairly confident that my organization as well as others would not be willing to bend on this restriction for a mass amount of people.

Is this requirement totally necessary or is it something that can be worked around?
Jun 8, 2011
#1 ian.g.si...@gmail.com
That was me reporting before, just used the wrong email address..

I looked at the JavaDoc and tried to use what appears to be the quasi-desirable workaround:

DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();  ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
WebDriver driver = new InternetExplorerDriver(ieCapabilities);

After doing this, I see an IE window that says it's the base WebDriver window (progress!), but then immediately after I see a big nasty stacktrace:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10003280, pid=2284, tid=1880
#
# JRE version: 6.0_25-b06
# Java VM: Java HotSpot(TM) Client VM (20.0-b11 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  0x10003280
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Jun 8, 2011
Project Member #2 james.h....@gmail.com
Does the problem you're experiencing happen on the line of code creating the InternetExplorerDriver (i.e. the line that reads "WebDriver driver = new InternetExplorerDriver(ieCapabilities);"), or does the crash happen when attempting to execute the next line of code?
Jun 8, 2011
Project Member #3 barancev
It's a sign of flakiness you've asked to introduce :)

Corporate policies are good for workstations and production servers, in a test lab you'd better have some additional abilities to change computer settings, install additional software, monitor system logs etc. Try to explain to your boss that you need a special policy for the test lab.
Jun 8, 2011
#4 ian.g.si...@gmail.com
My bad, I should have included the rest of the stack trace.

Instantiating the driver passes with the override in place.  The crash happens when I try to actually use it:

org.openqa.selenium.NoSuchElementException: Unable to find element with id == search-input (WARNING: The server did not provide any stacktrace information)
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_25'
Driver info: driver.version: RemoteWebDriver
	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:131)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:192)
	at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:209)
	at org.openqa.selenium.By$ById.findElement(By.java:199)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:184)
	at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:58)
	at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:35)
	at $Proxy31.sendKeys(Unknown Source)

My code is calling driver.get to load our home page, and then uses PageFactory to initialize a WebElement bound to id=search-input.  I'm not seeing IE ever load the homepage though which would explain the exception.
Jun 8, 2011
#5 ian.g.si...@gmail.com
I'm working on talking to our corporate systems people to see what can be done about this.  We are given the ability to be local system administrators so that we can install tools, but this particular setting is beyond what can be changed.  We may end up setting up an additional group to circumvent the issue.
Jun 8, 2011
#6 ian.g.si...@gmail.com
Talked to the corporate systems folk, and it sounds like my organization may have hit an impasse on this issue.

My initial thought was that we could set protected mode as enabled for all zones, as we don't want to have it disabled on individual workstations for external access.  However, as it turns out we have internal applications that don't work if protected mode is turned on for internal sites.  We also discussed having test machines separate from workstations that could be remotely accessed, but there's the logistical complication of people needing to have their IDE/Maven and such set up in such a way.

Our corporate systems team is going to talk to our security team on the issue and get back to me.  In the meantime, I'm still curious to figure out what's happening when flakiness == 1, because not even loading the page is beyond just being flaky.
Jun 8, 2011
#7 t12...@gmail.com

Hi

I have the same problem also when using Selenium 2.0rc2. I am running it on Windows 7 IE8 and VS2010. In my system I and disable UAC and also protection mode in IE8. But i still see this issue.

System.InvalidOperationException: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 990
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(DriverCommand driverCommandToExecute, Dictionary`2 parameters) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 801
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 769
   at OpenQA.Selenium.IE.InternetExplorerDriver..ctor() in 

When i revert the dll to Selenium 2.0b3 i do not see this issue. I hope a fix will for this soon.


Jun 8, 2011
#8 t12...@gmail.com
also the error comes up when executing IWebDriver driver = new InternetExplorerDriver();
Jun 9, 2011
Project Member #10 james.h....@gmail.com
About a year ago, the IE driver was rewritten from the ground up. This rewrite is what caused the need to manage the Protected Mode settings of IE. A good discussion of why this requirement for mananging Protected Mode can be found in the Selenium developers mailing list archive. The specific thread containing this disucssion can be found at http://groups.google.com/group/selenium-developers/browse_thread/thread/4dd6330f97bd2312/3e904642ac3dac6?q= .

The only new information from that thread is that we have discovered where in the registry the Protected Mode settings are stored and can check the settings thereof. Passing the flag in the Capabilities object merely bypasses the registry check. In short, when crossing a Protected Mode boundary, the COM object that the IE driver is connected to becomes orphaned. This is by design in IE from version 7 onward and Microsoft has made it impossible to be worked around, disabled, or ignored.
 
If you're truly interested in what the code is doing, look at BrowserFactory.cpp in the project sources. That's where IE instances are created and attached to.
Jun 9, 2011
Project Member #11 james.h....@gmail.com
Reverting to the Selenium 2.0b3 dlls will eliminate the error, because the registry check was not in place until 2.0rc1. I absolutely do *NOT* recommend disabling UAC. If you re-enable UAC, and reset Protected Mode for each zone (in IE, Tools > Internet Options > Security tab, checkbox at the bottom of the dialog labeled "Enable Protected Mode"), what happens?
Jun 9, 2011
#12 t12...@gmail.com
After re-enable UAC, and reset Protected Mode for each zone I still get the same error.
Jun 13, 2011
#13 nsa.lum...@gmail.com
Setting it to the same value fixed the issue, but this problem is exceedingly complicated for my organization.  I needed to have another user account created, as the way our infrastructure is set up these permissions are bound to the account itself and not a group.  I had to have another account created because changing my master account would have locked me out of a litany of important services.

I understand that you are at the behest of what Internet Explorer provides you, but I have a feeling this is going to cause us some issues.
Jun 13, 2011
Project Member #14 james.h....@gmail.com
I understand the issue, and I am sympathetic. I'm open to suggestions how to solve the problem, and I'm happy to provide guidance into the architecture of the C++ code if you want to try to refactor that code in such a way as to solve the problem in a different way. You may be able to work around the problem by clever manipulation of the places the browser visits so that you never cross a Protected Mode boundary, but I think you're going to find that exceedingly difficult too.
Jun 13, 2011
#15 ian.g.si...@gmail.com
I have a request in for permission to work on this open source project with my employer, so I may dig into it to see if I can help in any way.  Based on what you guys have said so far, it sounds daunting to say the least.  It seems like our site ends up in mixed mode quite often, so I don't know if I'd be able to set up the tests to avoid the issue.
Jun 13, 2011
#16 ian.g.si...@gmail.com
By the way, my issue of not finding the element with flakiness = 1 above was due to my own ignorance, and was not a fault of web driver. :)  Still trying to find a way to work around the protected mode thing within my organization though.
Jun 13, 2011
#17 t12...@gmail.com
Hi Ian

How did you get it working. In my org i can change security setting as i like but i still get the same issue. What are the settings did you do to get selenium to work. I am getting error even after enabling UAC. 
What did you mean by "Setting it to the same value fixed the issue". It would be greatly help full what you had done to make it work.

did you create ur script using java & eclipse or C# & VS2010.  

Thanks
Tk
Jun 14, 2011
Project Member #18 james.h....@gmail.com
@Tk Either the zone settings are not set correctly, or our check of the registry is incorrect. You can also add the "ignoreProtectedModeSettings" capability to a DesiredCapabilities object to bypass the zone setting check. This is not really the appropriate forum for real-time troubleshooting. I would suggest hopping on the IRC channel. You could also check the registry yourself to see what the values are that we are checking.
Jun 14, 2011
#19 Mochalin...@gmail.com
I have the same issue. Protected mode is disabled. 
IE9 + Win 7 + C# + VS 2010
source code:
 IWebDriver driver = new InternetExplorerDriver();
 driver.Navigate().GoToUrl("http://google.com");
 driver.Close();

Additional Information here:

System.InvalidOperationException was unhandled by user code
  Message=Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)
  Source=WebDriver.Remote
  StackTrace:
       at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 990
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(DriverCommand driverCommandToExecute, Dictionary`2 parameters) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 801
       at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 769
       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 63
       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Remote\RemoteWebDriver.cs:line 80
       at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(Int32 port, ICapabilities desiredCapabilities) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.IE\InternetExplorerDriver.cs:line 85
       at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(Int32 port) in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.IE\InternetExplorerDriver.cs:line 66
       at OpenQA.Selenium.IE.InternetExplorerDriver..ctor() in e:\Projects\WebDriver\trunk\dotnet\src\WebDriver.IE\InternetExplorerDriver.cs:line 57
       at QuestUITests.SampleCodedUITests.FindElement() in C:\QA Automation Moscow\Shared Resources\Coded UI Tests\Shared Library\Current\QA.CodedUITest\SharedCodeLibrary\SampleCodedUITests.cs:line 25
  InnerException: 

1.png
101 KB   View   Download
Jun 14, 2011
Project Member #20 james.h....@gmail.com
Look in your registry under the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones key. Under there, you should see keys number 0-5. Under keys 1-4, look for a value named 2500, and list either the value for each of the keys, or if the value does not exist.
Jun 14, 2011
#21 Mochalin...@gmail.com
Thanks  for your reply  but it doesn't help.
I attached  my reg file 
Zones.reg
21.7 KB   View   Download
Jun 14, 2011
Project Member #22 james.h....@gmail.com
The attached registry file looks at HKEY_LOCAL_MACHINE. You need to look at HKEY_CURRENT_USER.
Jun 14, 2011
#23 Mochalin...@gmail.com
You are right!  Thanks a lot! it's working!!!
Jun 14, 2011
#24 ian.g.si...@gmail.com
I have mine set to enabled for all zones.  I'm using Eclipse 3.6.2 and Java 1.6.
Jun 17, 2011
#25 tungm...@gmail.com
I had the same problem when run a Java Web Start app.

Fix by:
in section create driver:
        if (browser.endsWith("firefox")) {
            _logger.info("firefox");
            _driver = new FirefoxDriver();
        } else {
            _logger.info("iexplore");
            DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
            ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
            _driver = new InternetExplorerDriver(ieCapabilities);
        }

In jnlp:

<extension name="JavaCL"
            href="http://nativelibs4java.sourceforge.net/webstart/OpenCL4Java/JavaCL.jnlp" />

Thanks for all support!
Jul 1, 2011
#26 pioter.j...@gmail.com
It was working for me in 2.0b3.
Sep 2, 2011
Project Member #27 david.bu...@theautomatedtester.co.uk
Closed after last comment
Status: WontFix
Sep 9, 2011
#28 anderson...@gmail.com
Why was this closed... I still see it as an issue..
Sep 17, 2011
#29 gcros...@gmail.com
If you turn ON protected mode in ALL Internet Explorer Zones (Security Tab in IE settings) I believe the issue is resolved.
Oct 21, 2011
#30 joseph.v...@gmail.com
I turned _on_ protected mode for all zones in IE Security settings and it is working now.
Oct 24, 2011
#31 sergioca...@gmail.com
Great solution, thanks!
Oct 27, 2011
Project Member #33 simon.m.stewart
@32: First off, sorry that you feel that the free Open Source project is doing things you think are foolish. Secondly, you might be interested in this:

http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/ie/InternetExplorerDriver.html#INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS

Setting that value on a DesiredCapabilities passed to the IE driver's constructor bypasses the domain check.
Oct 27, 2011
#34 jjspr...@gmail.com
My primary concern regarding this issue: it is the default "unboxing" experience for all new Windows Vista/7 + IE users, and the work-around isn't clear for all programming languages (many Windows devs use C#, missing InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS). Here is the scenario:

 1. nuget install-package selenium-webdriver
 2. paste in example from getting started
 3. switch InternetExplorerDriver in for FirefoxDriver
 4. InvalidOperationException
    - the error message is pretty clear now that I know what's happening but at first I focused on the (NoSuchDriver) part and started thinking I was missing a download like the Chrome driver...


In some ways this could be considered a design decision similar to the Selenium IDE's unwillingness to show tests in anything but HTML by default to encourage exporting, except that in this case the alternative isn't clearly documented in the same place. Please add the following information to the getting started + FAQ if possible, or explain what I can do to help surface it more effectively:


http://groups.google.com/group/selenium-users/browse_thread/thread/91aed4790155b4e1
C# needed:

 var capabilities = new OpenQA.Selenium.Remote.DesiredCapabilities();
 capabilities.SetCapability("ignoreProtectedModeSettings", true);
 using (var driver = new InternetExplorerDriver(capabilities))
 {


https://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q:_The_does_not_work_well_on_Vista._How_do_I_get_it_to_work_as_e
Proposed work-around:  all security domains are set to the same value (either trusted or untrusted)


http://www.seleniumwiki.com/automation-tips/issues-running-selenium-test-scripts-on-ie8-on-windows-7/
Proposed work-around: "Uncheck the Enable protected mode check box."

Oct 27, 2011
Project Member #35 james.h....@gmail.com
To address one of your C# concerns, a static field has been added onto InternetExplorerDriver in the .NET bindings called IntroduceInstabilityByIgnoringProtectedModeSettings as of r14409. While I sympathize that "out of box experience" could be better, we do document this in several places. You've pointed out two of them (one of which is not maintained by the development team), and the project wiki page for the IE driver[1] has another. Also the text of the exception's message is quite explicit. Are you asking simply to add C# sample code to the FAQ?

[1] https://code.google.com/p/selenium/wiki/InternetExplorerDriver
Oct 27, 2011
#36 jjspr...@gmail.com
I would appreciate two changes:

1. Explain how to add the INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS to DesiredCapabilities for languages that don't have the static field, perhaps by including the the C# sample in the FAQ. Nothing on the site currently demonstrates how to accomplish this.

2. Change the the C# sample under getting started to use InternetExplorerDriver ( http://seleniumhq.org/docs/03_webdriver.html#getting-started-with-selenium-webdriver ), doing whatever is necessary (link to FAQ / SetCapability / whatever) to get the example to work in Windows + IE.

Thank you much for the time you invest in making this project what it is. I am sharing my input with you because I hope you will consider *eliminating* the immediate friction a huge mass of potential users will hit, guaranteeing a certain percentage will move on. Documentation is great, but in my perhaps annoying opinion delving into documentation shouldn't be necessary when I make a switch from Firefox to Internet Explorer on a getting started sample for a web testing platform.
Dec 28, 2011
#37 praveen....@gmail.com
The info given by experts are very useful. I'm struck up with the same issue, but after going through the threads., i fixed it by disabling the protected mode in the Internet options. :) Thanks all.. :)
Jan 10, 2012
#38 mr.ble...@gmail.com
I had the same issue - setting the Protected Mode to be checked and the same for all zones didn't fix it.  However, setting the Protected Mode to be unchecked and the same for all zones did fix it - with the caveat that IE warns me that this may be unsafe...
Feb 22, 2012
#39 opst...@gmail.com
This may sound small in the grand scheme of things.  I have worked around the issue by placing a host entry in the local host file for the sever the applet that is being called is working against.  Once I took the domain authentication and the reverse lookup out of the mix everything worked as it should.  I added the host entry in the AV corporate monitored host file (pushed down to all clients in the event the user or application happens to change the host file) and now the applet resolves locally and I have no more issue.  Not a very code worthy approach but a working fix that takes protected mode out of the mix.  

Of course once you make the host file change you need to enable the next generation plugin. Clear the browser and Java cache and open a new browser session.  Works for our several thousand workstation deployment.
Feb 29, 2012
#40 shabazi...@gmail.com
Hi There All,

I still see this as an issue.

Am on 64 bit Win 7 box so its InternetExplorer 64 bit 


I tried changing the security settings with Enabled & disabled settings for all zones.

Any detailed steps would be great help 

Here is the stacktrace :
------------------------
org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 112 milliseconds
Build info: version: '2.19.0', revision: '15849', time: '2012-02-08 16:10:57'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0'
Driver info: driver.version: InternetExplorerDriver
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:170)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:123)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:439)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139)
	at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetExplorerDriver.java:91)
	at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:48)
	at com.web.webmnx10.Search.testSearch(Search.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



Feb 29, 2012
#41 shabazi...@gmail.com
Also what does this mean 

Feb 29, 2012 5:37:09 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
Feb 29, 2012 5:37:09 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Apr 2, 2012
#42 talkwith...@gmail.com
When i try to launch the selenium im getting the following exception

02-Apr-2012 11:37:59 org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
02-Apr-2012 11:38:00 org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request

I tried to resolve the error by turning on the Protected mode in IE and still no luck.
I'm using windows 7 and selenium-java 2.16.1 jar with selenium-ie 2.16.1 jar file. The piece of code when it crashes is 

InternetExplorerDriver driver = new InternetExplorerDriver();

The next piece of line is not getting executed. Please provide an solution for this or comment if additional details is required.
Apr 20, 2012
#43 goo...@nfstimpson.co.uk
I get the "Protected Mode must be set to the same value" error randomly. IE9, Win7. I have all zones set to Protected Mode On. I run my selenium test and it terminates almost immediately. Change nothing, start the test again, and it runs fine. Start the test again and the failure occurs.

Looking though the BrowserFactory.cpp code, I note that there's error handling in the GetZoneProtectedModeSetting if the registry key read fails. Why that might happen I don't know, but it might be better to report such a failure separately as with the current behaviour it's very hard to see whether that might be what's wrong.

Also, to me the result of the error handling for GetZoneProtectedModeSetting looks wrong: it's returning value 3 for when the default mode is on, and 0 for off. But inspecting the registry seems to indicate the 0 = on and 3 = off.
Apr 21, 2012
Project Member #44 dawagner@gmail.com
@43 please file a new issue
Apr 30, 2012
#45 cftestd...@gmail.com
Did we get this sorted out ....

Has someone raised a new issue 
Apr 30, 2012
Project Member #46 james.h....@gmail.com
@43 You're right. The logic is backward for installations where the value in the registry doesn't exist. This is, in my experience, a pretty rare case, usually only on brand-new virgin installations of Windows. Nevertheless, I've corrected the logic as of r16751. Additionally, if you've checked the code in BrowserFactory.cpp since r16733, you'll notice that various error conditions now report different error strings, so it should be easier to diagnose where the issue is occurring.
May 3, 2012
#47 nikil...@gmail.com
DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
		ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true); 

WebDriver dr = new InternetExplorerDriver(ieCapabilities);
May 23, 2012
#48 shabazi...@gmail.com
Add the below snippet works fine

By ignoring the protected mode settings 

var options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
IWebDriver driver = new InternetExplorerDriver(options);
May 28, 2012
Project Member #49 simon.m.stewart
This feature works as intended, and the workaround in comment 48 is the right one.
Dec 4, 2012
#51 thotamah...@gmail.com
@29 & @30. You people told that after Turned on the Protected mode,its working for you, but when i changed the setting to Default in Security tab, i am getting the same error. Please find the code below.

log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11.64 seconds
Build info: version: '2.21.0', revision: '16552', time: '2012-04-11 19:08:38'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_31'
Driver info: driver.version: InternetExplorerDriver
	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:175)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:128)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:459)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:140)
	at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetExplorerDriver.java:113)
	at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:52)
	at Example.Script.main(Script.java:13)

Please help me on this issue.
Dec 4, 2012
#52 thotamah...@gmail.com
I am using windows XP and IE8 in my system. so I am not getting the Enable Protected Mode Option. Can anyone suggest me workaround on this....
Mar 7, 2013
#53 ragamu...@gmail.com
I second the previous question. We are on Windows XP and do not have the Enable Protected Mode Option. What should we do in this case?
Mar 7, 2013
Project Member #54 james.h....@gmail.com
If you're running XP, I've repeatedly asked for a log at either the debug or trace levels from IEDriverServer.exe so that I can diagnose the issue. No such log has been forthcoming. If you're using the Java language bindings, you can change the logging level by setting the appropriate attributes on the InternetExplorerDriverService, using the Builder class (InternetExplorerDriverService.Builder). 
Apr 18, 2013
#55 ron.g.se...@gmail.com
win 7, ie 9. Set all zones ( 4 tabs) protected mode on. And the problem is gone.
Jun 24, 2013
#56 lqemailb...@gmail.com
Look in your registry under the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones key. Under there, you should see keys number 0-5. Under keys 1-4, look for a value named 2500, and list either the value for each of the keys, or if the value does not exist.

thanks,my problem is solved.

Jul 30, 2013
#57 azaas2...@gmail.com
未处理System.InvalidOperationException
  HResult=-2146233079
  Message=Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)
  Source=WebDriver
  StackTrace:
       在 OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:行号 1058
       在 OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:行号 849
       在 OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:行号 814
       在 OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:行号 90
       在 OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerDriverService service, InternetExplorerOptions options, TimeSpan commandTimeout) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\IE\InternetExplorerDriver.cs:行号 142
       在 OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerDriverService service, InternetExplorerOptions options) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\IE\InternetExplorerDriver.cs:行号 130
       在 OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerOptions options) 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\IE\InternetExplorerDriver.cs:行号 86
       在 OpenQA.Selenium.IE.InternetExplorerDriver..ctor() 位置 c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\IE\InternetExplorerDriver.cs:行号 76
       在 SelenuimWebTest.Program.Main(String[] args) 位置 c:\Users\danda_000\Documents\Visual Studio 2012\Projects\SelenuimWebTest\SelenuimWebTest\Program.cs:行号 21
       在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Nov 19, 2013
#58 liqq0...@gmail.com
#55's reply have helped me with the same problem.Thanks.
Jan 8, 2014
#59 sandy.su...@gmail.com
thanks #29, it works for me! selenium2.39+IE9+win7+x64+eclipse4.20+jdk1.7

#29 gcros...@gmail.com
If you turn ON protected mode in ALL Internet Explorer Zones (Security Tab in IE settings) I believe the issue is resolved.
May 21, 2014
#60 verusze...@gmail.com
Hi, I'm having issues similar to the original poster;

I work for a company that enforces zone settings via Domain Policy/GPO. Our application is a webapp that is currently IE-only (although we're looking to change that, thus why I was tasked with investigating Selenium), and requires that Protected Mode be disabled, and our site added as a Trusted Site in IE.

Our domain settings, however, leave Protected Mode on for the regular Internet zone; our Security team will not budge on this, nor should they have to.

I've tried the following to bypass the registry check, but it doesn't seem to work.

InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;

(I'm writing in C#, not Java.)

Are there any other options to get this to work?
May 21, 2014
Project Member #61 james.h....@gmail.com
No. As discussed in multiple other places, including comments on this issue, there is no other way around this issue. The reasons for this behavior in the IE driver are technical, and well-documented. In other words, they are not arbitrary, put there to frustrate you or your IT department. However, in point of fact, yes, they should be expected to change their policy, if the expect WebDriver code to work with IE. The technical reasons are documented in a post on the blog at http://jimevansmusic.blogspot.com. As I also mentioned in comment #14, I'm willing to review any patches to the IE driver that you believe would fix the issue.
May 21, 2014
#62 verusze...@gmail.com
Thanks, I was wondering if there may have been any developments since the last post on this thread was a few years old.
Jun 23, 2014
#63 kounain....@osscube.com
Hi All,
You can use the below snippet.
	
				System.setProperty("webdriver.ie.driver",System.getProperty("user.dir")+"\\Drivers\\IEDriverServer.exe");
				//driver = new InternetExplorerDriver();
				DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
				capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
				driver = new InternetExplorerDriver(capabilities);
				driver.manage().window().maximize();
Sign in to add a comment

Powered by Google Project Hosting