I got a page with couple hidden spans with same class. I need to check, if is one of them displayed on a page. I tried to use @driver.find_element(:class, 'some class').displayed?
but it returns false
, when visible span not first with that class on DOM. Is any way I can handle that?
UPDATE
HTML
<html>
<head></head>
<body>
<div class="span1" style="display: none;">
<span class="some class">Some Error</span>
</div>
<div class="span2" style="display: none;">
<span class="some class">Some Error</span>
</div>
<div class="span3" style>
<span class="some class">Some Error</span>
</div>
</body>
</html>