selenium cannot find element with class in IE
- by Rob
I'm using selenium_client with cucumber, webrat + IE
As you'd expect, Firefox works fine. I've tried the following:
selenium.is_visible("css=#flash .flash_notice")
selenium.is_visible("xpath=//*[@id='flash']/*[@class='flash_notice]")
selenium.is_visible("xpath=//*[@id='flash']/*[contains(@class,'flash_notice]')")
both cannot find the element.
I think it must be something to do with IE, looking closer at the html selenium returns from IE...
It looks like this:
<UL id=flash>
<LI className=flash_notice>Deleted</LI>
</UL>
Notice IE returns the class attribute as className, is this confusing selenium? How can I get round this so that I can use the same statement for selenium using IE and Firefox
Just to confuse us even more, this example works, confirming its something to do with checking the class attribute
selenium.is_visible("xpath=//*[@id='flash']/*[. =\'Deleted\']")