title: Selenium Webdriver: visibilityOfElementLocated although element not visible
body: <p>I'm facing the problem that the Firefox Webdriver does not determine correctly if an element is visible or not: This is the code I'm using, which returns that the element is visible although it's not</p>
  
  <pre><code>wait.ignoring(UnhandledAlertException.class).until(ExpectedConditions.visibilityOfElementLocated(By.id("ad")));
  </code></pre>
  
  <p>Now, what if I am testing a website, where the element can be found in the source of the site but is not visible (e.g. because there is another element in front of it). From what I could gather the <code>visibilityOfElementLocated</code> method only checks if the element's width and height is >0, doesn't it?
  Is there a way to check if the element is REALLY visible for a user surfing on the site, considering bad layout and wrong z-indexes etc.? This would really be great...</p>
  
  <p>Thank you!</p>