Skip to content

[🚀 Feature]: new atom WebElement.isPointerReachable() #16036

@joerg1985

Description

@joerg1985

Description

The current ExpectedConditions.elementToBeClickable is in my mind kind of missleading, as it does a WebElement.isDisplayed() && WebElement.isEnabled() check.

A more meaningful check could be done by creating a new atom WebElement.isPointerReachable(),
this atom could use Document.elementFromPoint to check the clickabilty of an element.

The atom must scroll to the element into the viewport (e.scrollIntoView()) and check the center & top left & top right & bottom left & bottom right points of the element does return the element or a child of the element.

This approach has some limitations, as an element larger than the viewport will allways be not pointer reachable.
But these limitations are in my mind better than the limitations of WebElement.isDisplayed(), as they are false negative results. The isDisplayed does trend to false positive results, what is bad in testing (e.g. an element A does overlap another element B, but element B is still considerer as displayed).

I think there is some research needed to evaluate this.
Don't you see false positive results of isDisplayed in your tests?
I would like to know others are interrested into this?

Have you considered any alternatives or workarounds?

Implement it myself :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!B-atomsJavaScript chunks generated by Google closureI-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions