watir-webdriver + protected mode in XP-IE8

988 views
Skip to first unread message

RJ

unread,
Oct 18, 2011, 1:45:17 PM10/18/11
to Watir General
Getting following error msg:
Selenium::WebDriver::Error::NoSuchDriverError: Unexpected error
launching Internet Explorer. Protected Mode must be set to the same
value (enabled or disabled) for all zones.

but this feature is not available on XP-IE8. What to do.

Thanks,
RJ

Chuck van der Linden

unread,
Oct 18, 2011, 4:56:41 PM10/18/11
to Watir General
It's still there in IE8. whether it enables or not depends on
several things, browsing local subnet sites vs internet, settings for
UAC if running of Vista or Win7, and if you started IE 'as
administrator' or not.

What I've found sometimes solves this kind of issue is to go into the
Internet Security Properties UI and set all the zones that may be
encountered when running a script to the same zone, most often
'trusted' Then also make sure your homepage, and the page displayed
when any new tab is opened are also set the same way, that includes
'about:blank' and 'about:tabs.

Another thing that can sometimes make a difference is opening up your
command line session (that you run your scripts from) 'as
administrator' as this can affect the security settings in an IE
session launched via that CMD window.

What's happening is that as a type of protection against cross site
scripting attacks, whenever the browser changes security zones, it
basically destroys the instance that was running in the old context,
and creates a new one. When that happens the underlaying
identification of the window changes, and watir looses connection to
the browser. You need to either attach, or use the watir-webdriver
methods to change to the appropriate browser window just as you would
have to do if you had closed and re-opened IE. That's probably not
accurate in a very technical sense, but it's close enough to
understand the nature of the problem.

For more info, see here http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx
and/or do a bunch of googling for protected/protection mode and IE8

Željko Filipin

unread,
Oct 19, 2011, 4:26:32 AM10/19/11
to watir-...@googlegroups.com
On Tue, Oct 18, 2011 at 7:45 PM, RJ <rj41...@gmail.com> wrote:
> but this feature is not available on XP-IE8.

I will try to install watir on xp with IE8 this Saturday.

The results will be here:

RJ

unread,
Oct 24, 2011, 10:54:56 AM10/24/11
to Watir General
Zeljko,

Did u get a chance to look into this?
IE8 on windows XP protected mode?

Thanks

Željko Filipin

unread,
Oct 24, 2011, 10:58:49 AM10/24/11
to watir-...@googlegroups.com
On Mon, Oct 24, 2011 at 4:54 PM, RJ <rj41...@gmail.com> wrote:
> Did u get a chance to look into this?
> IE8 on windows XP protected mode?

It is still on my todo list. I planned to work on it for my watir book the past Saturday, but then another project that actually makes money appeared, so this was delayed. :)

Željko

hillary

unread,
Oct 24, 2011, 3:06:13 PM10/24/11
to watir-...@googlegroups.com
I'm also getting this error. I'm running my tests with taza, which opens a new browser session for each test.  It doesn't happen for every test, but maybe one or two in each test run.

bis

unread,
Oct 24, 2011, 3:13:12 PM10/24/11
to watir-...@googlegroups.com
I have some time tonight i will throw together a VM with windows XP
and ie8 are there any other specifics i need to know before i set this
up?

> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-...@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-genera...@googlegroups.com
>

Željko Filipin

unread,
Oct 27, 2011, 7:52:52 AM10/27/11
to watir-...@googlegroups.com
On Tue, Oct 18, 2011 at 7:45 PM, RJ <rj41...@gmail.com> wrote:
> Protected Mode must be set to the same
> value (enabled or disabled) for all zones.
>
> but this feature is not available on XP-IE8.  What to do.

Really, there is no "enable protected mode" checkbox in IE8. Just checked.

Solutions:

1) Use watir gem to drive IE. Why are you using watir-webdriver gem to drive IE? Watir gem is better at the moment.
2) Enable protected mode in IE6/7 and then upgrade to IE8. That is what I did, and I can drive IE8 with watir-webdriver gem.

Željko

Željko Filipin

unread,
Oct 27, 2011, 7:59:29 AM10/27/11
to watir-...@googlegroups.com
On Thu, Oct 27, 2011 at 1:52 PM, Željko Filipin <zeljko....@wa-research.ch> wrote:
> Really, there is no "enable protected mode" checkbox in IE8. Just checked.

I have just checked, and that option is there only in IE9. It is not it IE 6, 7 and 8.

I am not sure why did you get that error message in IE8.

Željko

Chuck van der Linden

unread,
Oct 27, 2011, 3:33:05 PM10/27/11
to Watir General
On Oct 27, 4:59 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
> On Thu, Oct 27, 2011 at 1:52 PM, Željko Filipin <
>
> zeljko.fili...@wa-research.ch> wrote:
> > Really, there is no "enable protected mode" checkbox in IE8. Just checked.
>
> I have just checked, and that option is there only in IE9. It is not it IE
> 6, 7 and 8.
>
> I am not sure why did you get that error message in IE8.
>
> Željko

The way the browser is doing things may LOOK to the code driving it
the say way things do with regard to protected mode in IE9

Also recall that Protected Mode is OS sensitive IE7 and IE8 will be
different in that regard when running on XP compared to Vista, Server
2008, or Win7 See http://msdn.microsoft.com/en-us/library/bb250462%28v=vs.85%29.aspx,
what is described there is specific to vista, but as I recall
virtually the same on Server2008, Win7 and Server2008R2

srinivas kadiyala

unread,
Nov 11, 2014, 3:05:44 PM11/11/14
to watir-...@googlegroups.com
I get the same error: In IE 11


Selenium::WebDriver::Error::NoSuchDriverError: Unexpected error launching Intern
et Explorer. Protected Mode settings are not the same for all zones. Enable Prot
ected Mode must be set to the same value (enabled or disabled) for all zones.


How to solve it ?

Jim Evans

unread,
Nov 11, 2014, 5:29:31 PM11/11/14
to watir-...@googlegroups.com
How to solve it? Set the Protected Mode settings. For the technical reasons why the IE driver requires this, see http://jimevansmusic.blogspot.com/2012/08/youre-doing-it-wrong-protected-mode-and.html

srinivas kadiyala (SKC)

unread,
Nov 13, 2014, 12:55:57 AM11/13/14
to watir-...@googlegroups.com
thank you very much. i will try this out.

Regards,
Srinivas Kadiyala
Software Test Engineer  || Skype: srinivasskc
Twitter: @srinivasskc || Work Phone:
 (+91) 9036156876 


On 12 November 2014 03:59, Jim Evans <james.h....@gmail.com> wrote:
How to solve it? Set the Protected Mode settings. For the technical reasons why the IE driver requires this, see http://jimevansmusic.blogspot.com/2012/08/youre-doing-it-wrong-protected-mode-and.html

--
---
You received this message because you are subscribed to a topic in the Google Groups "Watir General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/watir-general/Z-Hk4HT2ggA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages