Closed Bug 1401197 Opened 7 years ago Closed 6 years ago

Overlayed element is not recognized as hidden and clickElement doesn't fail

Categories

(Remote Protocol :: Marionette, defect)

57 Branch
defect
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Attached file HTML test page
Having a page as the attached one where an overlay completely covers the full area, a call to `clickElement` on any element below this overlay will cause a click on the overlayed element. This is wrong, and a ElementNotInteractableError should be thrown.
Attachment #8909789 - Attachment mime type: text/plain → text/html
Here the Marionette test which demonstrates the failure:

    def test_click(self):
        self.marionette.navigate("https://bugzilla.mozilla.org/attachment.cgi?id=8909789")
        with self.assertRaises(errors.ElementNotInteractableException):
            self.marionette.find_element(By.ID, "link").click()
So this happens for both, the legacy and the webdriver conforming click. As such it should not be a blocker of bug 1321516.
No longer blocks: 1321516
FYI error is returned for me with FF57 beta4. Is your patch applied or was this fixed as part of bug 1333014?
I mean with webdriver conforming click. Without it, the element is clicked without any error.
(In reply to Alexander from comment #4)
> I mean with webdriver conforming click. Without it, the element is clicked
> without any error.

Without it the expected link is not clicked but the overlay one. As such the URL gets a `#overlay` hash added. Can you please verify that with Firefox 58? Please note that with this version you have to specify `moz:webdriverClick: False` to disable it.

Thanks
Flags: needinfo?(akostadinov)
Sorry for delay! Appears to be working fine (including a nice error message) with ff58 beta13:

> b.browser.a(id: "link").click
> Selenium::WebDriver::Error::ElementClickInterceptedError: Element <a id="link" href="#expected"> is not clickable at point (62,17.5) because another element <a class="overlay" href="#overlay"> obscures it
Flags: needinfo?(akostadinov)
That sounds great. Thanks!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
With geckodriver 0.19.1 and ff58 beta13 `moz:webdriverClick: True`:

> 1515077996082	Marionette	TRACE	0 -> [0,7,"clickElement",{"id":"2bd79060-0c67-4313-a0cc-f22a508ea7ee"}]
> 1515077996096	Marionette	TRACE	0 <- [1,7,{"error":"element click intercepted","message":"Element <a id=\"link\" href=\"#expected\"> is not clickable at point (62 ... avigate@chrome://marionette/content/listener.js:408:13\nclickElement@chrome://marionette/content/listener.js:1308:5\n"},null]
> 1515077996096	geckodriver::marionette	TRACE	<- [1,7,{"error":"element click intercepted","message":"Element <a id=\"link\" href=\"#expected\"> is not clickable at point (62,17.5) because another element <a class=\"overlay\" href=\"#overlay\"> obscures it","stacktrace":"WebDriverError@chrome://marionette/content/error.js:172:5\nElementClickInterceptedError@chrome://marionette/content/error.js:269:5\nwebdriverClickElement@chrome://marionette/content/interaction.js:170:11\ninteraction.clickElement@chrome://marionette/content/interaction.js:132:11\nclickElement/<@chrome://marionette/content/listener.js:1309:14\nnavigate/<@chrome://marionette/content/listener.js:409:13\nnavigate@chrome://marionette/content/listener.js:408:13\nclickElement@chrome://marionette/content/listener.js:1308:5\n"},null]

With geckodriver 0.19.1 and ff58 beta13 `moz:webdriverClick: False`:

> 1515078399955	geckodriver::marionette	TRACE	-> 66:[0,7,"clickElement",{"id":"879b46be-cb0b-43c6-8171-527e1f26c07c"}]
> 1515078399956	Marionette	TRACE	0 -> [0,7,"clickElement",{"id":"879b46be-cb0b-43c6-8171-527e1f26c07c"}]
> 1515078399980	Marionette	DEBUG	Received DOM event "popstate" for "https://bug1401197.bmoattachments.org/attachment.cgi?id=8909789#overlay"


The only thing that worries me is that I don't see any mention of `ElementNotInteractableException` in the trace log. Probably github issue [1] can be closed now.

[1] https://github.com/mozilla/geckodriver/issues/813
(In reply to Alexander from comment #8)
> With geckodriver 0.19.1 and ff58 beta13 `moz:webdriverClick: True`:
> 
> > 1515077996082	Marionette	TRACE	0 -> [0,7,"clickElement",{"id":"2bd79060-0c67-4313-a0cc-f22a508ea7ee"}]
> > 1515077996096	Marionette	TRACE	0 <- [1,7,{"error":"element click intercepted","message":"Element <a id=\"link\" href=\"#expected\"> is not clickable at point (62 ... avigate@chrome://marionette/content/listener.js:408:13\nclickElement@chrome://marionette/content/listener.js:1308:5\n"},null]
> > 1515077996096	geckodriver::marionette	TRACE	<- [1,7,{"error":"element click intercepted","message":"Element <a 
> [..] 
> The only thing that worries me is that I don't see any mention of
> `ElementNotInteractableException` in the trace log.

You will get a https://w3c.github.io/webdriver/webdriver-spec.html#dfn-element-click-intercepted error in such a case.

> [1] https://github.com/mozilla/geckodriver/issues/813

I will check. Thanks.
So this should actually be fixed by bug 1321516 then.
Depends on: 1321516
Resolution: WORKSFORME → FIXED
Target Milestone: --- → mozilla58
Assignee: nobody → hskupin
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: