This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29585 - Specific error code doesn't exist for blocked element not being clickable
Summary: Specific error code doesn't exist for blocked element not being clickable
Status: NEW
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-21 18:45 UTC by James
Modified: 2018-04-05 12:16 UTC (History)
3 users (show)

See Also:


Attachments

Description James 2016-04-21 18:45:51 UTC
There is no entry in https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors for an error code that is specific for an element not being clickable because it is blocked by another element being in front of it. I currently have a pull request open (https://github.com/SeleniumHQ/selenium/pull/1967) and was asked to open this spec bug to support it.
Comment 1 James 2016-04-21 18:48:45 UTC
The error code I propose (and that is in my pull request) is: "element intercepting click".
Comment 2 Brian Burg 2016-04-21 18:58:10 UTC
A few questions

 - What endpoints would be able to throw this error?
 - In what circumstances would this be thrown? How is it computable?

From a UA point of view, it doesn't make a whole lot of sense because clicks are specified in terms of coordinates, not a target element.

In the WebDriver specification, the "Element Click" endpoint can already throw "element not visible" if the element is not displayed at all. (Without looking it up, I don't know how displayedness is related to full occlusion or translucent elements.)

The terminology "intercepting click" assumes too much. If the occluded element is an ancestor of the visible element on top, then the ancestor will still receive a click event in the bubbling phase if propagation is not stopped earlier.
Comment 3 James 2016-04-21 19:06:32 UTC
(In reply to Brian Burg from comment #2)
> A few questions
> 
>  - What endpoints would be able to throw this error?
>  - In what circumstances would this be thrown? How is it computable?
> 
> From a UA point of view, it doesn't make a whole lot of sense because clicks
> are specified in terms of coordinates, not a target element.
> 
> In the WebDriver specification, the "Element Click" endpoint can already
> throw "element not visible" if the element is not displayed at all. (Without
> looking it up, I don't know how displayedness is related to full occlusion
> or translucent elements.)
> 
> The terminology "intercepting click" assumes too much. If the occluded
> element is an ancestor of the visible element on top, then the ancestor will
> still receive a click event in the bubbling phase if propagation is not
> stopped earlier.

Sorry if this wasn't clear - this isn't an error that is a precursor to being able to reliably tell when an element is being occluded or anything like that, I simply want to improve the existing functionality for what happens when you currently try to click an element that (according to webdriver) is visible but is blocked by another element (a header or footer are good examples).

This is different to element not visible in that the element that is trying to be clicked has passed the test of whether it is visible or not according to webdriver, but when it has tried to be clicked, the "Unknown error" with the message "Other element would receive the click" is returned making it impossible to filter for this error without doing a much more broad filter on an error higher up the hierarchy.

Again, apologies if this isn't all clear or concise, it's my first time contributing to selenium in general and as part of the contribution (see my pull request) I was requested to log a spec bug to add the new error code.

Thanks,

James
Comment 4 James 2016-04-21 19:19:43 UTC
New PR made: https://github.com/w3c/webdriver/pull/299