"Element Click" should consider overlay elements
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the WebDriver specification for the Element Click action reads: "The Element Click command scrolls into view the element".
I believe this term is not sufficient. The current specification ignores the impact of having overlay elements in the document (e.g. absolutely/relatively/fixed/sticky positioned elements). These elements are widely used throughout the web.
So, cross-browser testing is currently impossible. It's even impossible to test a page containing overlay elements on the same browser with the exactly same viewport dimensions.
So, I suggest the specification to read: "The Element Click command scrolls into view the element. Further, it scrolls the element within view until at least one pixel of the element is not covered by any overlaying element. If no such position within view can be found, the element is regarded 'unclickable'."
See this example:
In this example, recorded using current WebDriver implementations, there is a fixed <div> element at the bottom of the page, overlaying the page's content. This causes current WebDriver implementations to fail a recorded test:

Finding an element's scolling position that's providing a loophole in a viewport region containing arbitrary overlays isn't trivial, but undoubtably a necessity for testing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WebDriver specification's Element Click section and review the provided fixed
overlay example. Investigate how overlay elements affect scrolling and clickability across browser implementations. Done means the specification has an agreed, implementable treatment for covered elements and the cross-browser testing concern is addressed.Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- testing-qa, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100