clickElement does not move pointer before clicking
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: andrew, Assigned: andrew, Mentored)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Steps to reproduce:
Call the element/click endpoint
Minimal reproduction at https://github.com/andrewnicols/pointOnClick
Actual results:
The element is clicked
The mouse was not moved to the element
Expected results:
According to the W3C specification at https://w3c.github.io/webdriver/#element-click
Step 8 "Otherwise" states:
11: Dispatch a pointerMove action with arguments mouse’s input id, pointer move action, mouse’s input source state, and 0.
12: Dispatch a pointerDown action with arguments mouse’s input id, pointer down action, mouse’s input source state, and 0.
13: Dispatch a pointerUp action with arguments mouse’s input id, pointer up action, mouse’s input source state, and 0.
At present only steps 12, and 13 are completed.
Assignee | ||
Comment 1•3 years ago
|
||
Confirmed against default
Assignee | ||
Comment 2•3 years ago
|
||
For W3C WebDriver Standards compliance the pointer should be moved to
the click target before the click occurs.
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Looks like the test file needs reformatting, but I'm not going to do so in this issue:
/Users/nicols/git/ext/gecko-dev/testing/marionette/harness/marionette_harness/tests/unit/test_click.py
0 error Reformat python (black)
Comment 4•3 years ago
|
||
Thanks Andrew for filing this issue. The underlying reason here is that at some point the WebDriver spec has been changed and now refers to action primitives. And that hasn't yet been implemented in Marionette. See bug 1490268.
I'm happy to accept a patch that simply emits a mouseover
event without implementing all the action primitive specific steps.
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
Thanks Henrik,
I did wonder whether we should be rewriting to ues the action primitives but I wasn't sure how best to achieve that.
Thanks
Comment 7•2 years ago
|
||
(In reply to Andrew Nicols from comment #6)
I did wonder whether we should be rewriting to ues the action primitives but I wasn't sure how best to achieve that.
No, we shouldn't at this point given that it is way more work. But we are able to easily synthesize a mousemove event. It would only have to be injected at the right position in webdriverClickElement().
Assignee | ||
Comment 8•2 years ago
|
||
Depends on D100381
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ab36b292611 [marionette] Synthesize a pointerMove action during elementClick r=marionette-reviewers,whimboo https://hg.mozilla.org/integration/autoland/rev/84620cb6c5ac [wdspec] Move filter_dict helper to shared helpers r=webdriver-reviewers,whimboo https://hg.mozilla.org/integration/autoland/rev/a0d4d9981b93 [wdspec] Test mouse moves before click r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27211 for changes under testing/web-platform/tests
Comment 11•2 years ago
•
|
||
Backed outfor causing failure at legend-hover.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/d77bfbe0b7cf445935d10807089e90369bed0de5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=326969131&repo=autoland&lineNumber=3777
Upstream PR was closed without merging
Assignee | ||
Comment 13•2 years ago
|
||
W3C specification states that the mouse should be moved before a click occurs, so this test should now be pass. I've updated D100381 to remove the expected failure state of this test as it is no longer accurate.
Comment 14•2 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c8749bb95a4 [marionette] Synthesize a pointerMove action during elementClick r=marionette-reviewers,whimboo https://hg.mozilla.org/integration/autoland/rev/2342b3670241 [wdspec] Move filter_dict helper to shared helpers r=webdriver-reviewers,whimboo https://hg.mozilla.org/integration/autoland/rev/4996d0da4234 [wdspec] Test mouse moves before click r=webdriver-reviewers,whimboo
Comment 15•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1c8749bb95a4
https://hg.mozilla.org/mozilla-central/rev/2342b3670241
https://hg.mozilla.org/mozilla-central/rev/4996d0da4234
Upstream PR merged by jgraham
Comment 17•2 years ago
|
||
Andrew, thanks a lot for fixing this bug!
Updated•4 months ago
|
Description
•