I have the following html code:
<div class="panel">
<div class = "heading">
<span class="wName">Name</span>
<div class="foo1" style="display: none;"></div>
<div class="foo2" style="display: none;"></div>
</div>
</div>
I already located element panel and I'm trying to test when foo2 doesn't appear with the following line of code:
if (panel.findElement(By.xpath("../div[@class='foo2']")).getCssValue("display").equals("none"))
I'm not sure why this won't retrieve the element properly.