Hi,
I think that the note in that section is helpful here. The typical usage
pattern here is something like:
WebElement element = driver.findElement(By.id("foo"));
if (element.isDisplayed()) {
element.click();
}
That is, users tend to use the displayed check to determine whether or not
it's safe to proceed. As such, although "a" would be lovely, because
WebElement.click tries to hit the middle of the element, "c" should be what
we use (that is, "is there some sequence of steps that would pull the
centre of this element into view so that I could then click it?")
What do you think? And would you like some clearer language in the spec for
that?
"b" seems excessively demanding, particularly if there's a large element
that's bigger than the view :)
Simon
On Tue, Oct 29, 2013 at 5:54 PM, John Jansen <John.Jansen@microsoft.com>wrote:
> Question on visibility [1]:
>
> I am not sure if an element is visible. If:
>
> a) any part of the element is in view
> b) and only if the entire rectangle of the element is in view
> c) and only if the middle point is in the view
>
> [1]
> https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#determining-visibility
>
>
>