Selenium not able to find element in IE8 if view mode is Compatibility view

317 views
Skip to first unread message

saorabh singh

unread,
Apr 4, 2012, 8:38:56 AM4/4/12
to seleniu...@googlegroups.com
Hi,
I am using Selenium version 2.20
Selenium not able to find element in IE if view mode is IE8 Compatibility view.
is there any solution??


Regards,
Saorabh Singh

saorabh singh

unread,
Apr 9, 2012, 1:36:10 AM4/9/12
to seleniu...@googlegroups.com
Hi,
Any one has seen similar problem??
please provide me the solution for this problem...
I am not bale to run my tests on some Machine in IE8.

Regards, 
Saorabh Singh

Jim Evans

unread,
Apr 9, 2012, 9:46:07 AM4/9/12
to seleniu...@googlegroups.com
You haven't provided any context for your question. You haven't said what API you're using (WebDriver or RC), you haven't said how you're trying to find your elements, and you haven't said what you've tried to mitigate the problem so far. I strongly suspect that the problem is related to differences in how IE constructs the DOM and uses JavaScript to interact with that DOM, but without more information, it's impossible to say.

--Jim

saorabh singh

unread,
Apr 10, 2012, 6:41:00 AM4/10/12
to seleniu...@googlegroups.com
Well here are the details:
i am using Selenium 2.20 Web driver,
Same scripts works fine on Some IE browsers(IE8), So when i investigated more, 
I got the only difference between two Browsers is 
Browsers where scripts are working fine is working on Normal IE8 mode
& other Browser where my scripts are getting failed is working on IE8 Compatibility view.

OpenUrl function works fine in IE8 Compatibility view, Problem Starts only from Find element functionality.
I am trying to find element by ID

These modes can be checked by pressing f12 & look for Browser mode.

Please let me know if i am missing some info.

Regards,
Saorabh Singh

Mike Riley

unread,
Apr 10, 2012, 1:48:33 PM4/10/12
to seleniu...@googlegroups.com
Have you set Zoom Level to 100%?

Have you set all Zones to the same level?

Those are common issues with IE.  You might have it set correctly for the other versions, but not this one.

Mike

saorabh singh

unread,
Apr 11, 2012, 2:53:02 AM4/11/12
to seleniu...@googlegroups.com
I tried above steps mentioned by u...
but still its not working

I am getting Exception:

org.openqa.selenium.NoSuchElementException: Unable to find element with name == username (WARNING: The server did not provide any stacktrace information); duration or timeout: 593 milliseconds
For documentation on this error, please visit: _http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.13.0', revision: '14793', time: '2011-11-18 13:17:39'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_20'
Driver info: driver.version: RemoteWebDriver

Regards,
Saorabh Singh

Vijendra Aithal

unread,
Apr 11, 2012, 3:04:54 AM4/11/12
to seleniu...@googlegroups.com
What Mike has said should have solved the problem ...

I faced similar problem once , and found that for me IE worked only when I unchecked the protected mode ... strange

Go to IE Security Tab,
For following zones
- Internet,
- Local internet,
- Trusted sites and
- Restricted sites

uncheck 'Enable Protected Mode' [Close all browsers and retry] ...

maybe you will get lucky

Regards
Vijendra

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/9CNivwtAmf4J.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Mark Collin

unread,
Apr 11, 2012, 7:06:01 AM4/11/12
to seleniu...@googlegroups.com

Have you compared the DOM between IE8 in compatibility mode and IE8 in normal mode?

 

In compatibility mode it frigs about with the DOM in an attempt to emulate earlier IE behaviour (but doesn’t quite match it).  I suspect that like Jim said the element is in a different place in the DOM in compatibility mode.

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1JDyRePwnqUJ.

Reply all
Reply to author
Forward
0 new messages