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•5 years ago
|
||
Confirmed against default
Assignee | ||
Comment 2•5 years ago
|
||
For W3C WebDriver Standards compliance the pointer should be moved to
the click target before the click occurs.
Updated•5 years ago
|
Assignee | ||
Comment 3•5 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•5 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•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 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•4 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•4 years ago
|
||
Depends on D100381
Comment 11•4 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
Assignee | ||
Comment 13•4 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•4 years ago
|
||
Comment 15•4 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
Comment 17•4 years ago
|
||
Andrew, thanks a lot for fixing this bug!
Updated•2 years ago
|
Description
•