Closed Bug 1415067 Opened 7 years ago Closed 7 years ago

overlappingCheckDisabled capability is not honored

Categories

(Remote Protocol :: Marionette, defect)

58 Branch
defect
Not set
normal

Tracking

(firefox57 unaffected, firefox58 affected)

RESOLVED INVALID
Tracking Status
firefox57 --- unaffected
firefox58 --- affected

People

(Reporter: barancev, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Steps to reproduce:

Run this snippet of code using Selenium 3.7.0 and geckodriver 0.19:

FirefoxOptions options = new FirefoxOptions();
options.setCapability(CapabilityType.OVERLAPPING_CHECK_DISABLED, true);
FirefoxDriver driver = new FirefoxDriver(options);
driver.get("https://output.jsbin.com/komihom");
driver.findElement(By.id("under")).click();


Actual results:

org.openqa.selenium.ElementClickInterceptedException: Element <div id="under"> is not clickable at point (70,70) because another element <div id="over"> obscures it



Expected results:

No exception expected, the driver should click the topmost element at point.

Works well in release channel (56.0.1). Used to work in Nightly before 2017-11-03.
What kind of capability is `OVERLAPPING_CHECK_DISABLED`? I cannot see it in the WebDriver specification, and as such it is not taken into account for the webdriver compliant click method as introduced with bug 1321516.

Also this was working before with geckodriver and Firefox up to version 57 because no interactability checks have been performed at all.

Andreas, I assume this is a relict from the old Firefox driver, and we won't longer support that?
Blocks: 1321516
Flags: needinfo?(ato)
(In reply to Henrik Skupin (:whimboo) from comment #1)

> I assume this is a relict from the old Firefox driver, and we
> won't longer support that?

I’ve never heard of OVERLAPPING_CHECK_DISABLED before.  I
don’t know what it is.

The basic principle we follow is that if something is not in the
specification, we won’t implement it.
Flags: needinfo?(ato)
This capability was supported by legacy Firefox driver. It's OK to close this issue if geckodriver is not going to support it.
Out of curiosity, what is it and what does it do?  Where is it documented?
https://github.com/SeleniumHQ/selenium/blob/6c27816c9b90e642228b43fb977a99c1b17a402e/java/CHANGELOG

v2.52.0
=======
Firefox:
  * Implementing a capability that disables overlapping checks - "overlappingCheckDisabled"

It was added by:
https://github.com/SeleniumHQ/selenium/commit/ab994066135f81b43d6ebed93bb398e7c7d064c1

I cannot find an issue nor PR for that landing.

As it looks like it was only added to Firefox, and no other browser. No idea, which purpose that has. But Alexei should be able to tell us.

Given that this is not covered by the spec, lets close the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
IIRC, the history is that FirefoxDriver did not check if an element was overlapped by another element. If you asked to click an element, but the point at which the click would occur was covered by another element, then your target element (the bottom element) would receive a click event anyway, even though that was impossible for a user to have done.

ChromeDriver checked for that overlapping condition and made it an error to try to click the bottom element. ("Element is not clickable at point (x, y). Other element would receive the click:"

Alexei added code to FirefoxDriver to implement that check, but because that would break existing tests, he also introduced a capability for users who wanted to preserve the old behavior. At the time, the legacy FirefoxDriver was the only major driver that omitted overlapping element checks.

The WebDriver spec does say that this should be an error, so I think you are correct to just declare that this is intentionally unimplemented.
I see. Thank you for the explanation, Jason! Good to see that our native implementation is in place by default now.
Yes, I know the history behind this capability :)

In the days of yore we used to have so called "native" events in Firefox driver. These "native" events were simulated on OS level. Obviously, they did not check element overlapping. The *topmost* element at point received the event (unlike Jason stated).

At the same time, Chrome driver used to check element overlapping.

While implementing "synthesized" events in Firefox driver we couldn't decide which party to join to. So we've foung a solution that would satisfy both parties. Without a capability Firefox driver checks overlapping. If it breaks your tests developed for "native" events, you can set OVERLAPPING_CHECK_DISABLED capability and make it more backward compatible.
Oh yes, that's true for native events. For synthesized events, we used to have a test that showed that the bottom element received the click. Naturally, that made things even more confusing.

... Well, at any rate, we can all be happy that this discrepancy was cleared up by the spec :)
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.