Closed Bug 1850166 Opened 9 months ago Closed 8 months ago

Wheel scroll action with an origin of type "pointer" fails with: "InvalidArgumentException: Expected x to be finite number"

Categories

(Remote Protocol :: Agent, defect, P1)

defect
Points:
1

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m8][wptsync upstream][webdriver:relnote])

Attachments

(2 files, 1 obsolete file)

While working on testcases for bug 1848957 I noticed that wheel actions are failing when the origin is pointer. Here a simplified Marionette testcase:

    def test_origin(self):
        wheel_chain = self.marionette.actions.sequence("wheel", "wheel_id")
        wheel_chain.scroll(15, 30, 20, 40, origin="pointer").perform()

The failure that results from that call to scroll():

ERROR testing/marionette/harness/marionette_harness/tests/unit/test_actions_wheel.py TestWheelAction.test_origin - marionette_driver.errors.InvalidArgumentException: Expected x to be finite number
stacktrace:
	RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
	WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5
	InvalidArgumentError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:380:5
	assert.that/<@chrome://remote/content/shared/webdriver/Assert.sys.mjs:485:13
	assert.number@chrome://remote/content/shared/webdriver/Assert.sys.mjs:204:43
	assertInViewPort@chrome://remote/content/shared/webdriver/Actions.sys.mjs:2142:15
	dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1156:21
	dispatch/pendingEvents<@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1836:14
	dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1835:39
	dispatch/chainEvents<@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1761:27
	dispatch@chrome://remote/content/shared/webdriver/Actions.sys.mjs:1763:7
	performActions@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:501:23
Attachment #9350339 - Attachment filename: 1.svg → testing spam 1.svg
Attachment #9350339 - Attachment is obsolete: true
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Points: --- → 3
Priority: -- → P1
Whiteboard: [webdriver:m8]

Turns out that there is an issue in the WebDriver classic specification around the calculation of the target coordinates.

I've filed a new issue for it: https://github.com/w3c/webdriver/issues/1758

Unless it's clear how it should work this bug is blocked. Lets discuss it next week when James is back.

Assignee: hskupin → nobody
Status: ASSIGNED → NEW
Points: 3 → ---
Priority: P1 → --
Whiteboard: [webdriver:m8]
Whiteboard: [webdriver:triage]

As discussed the current design in the WebDriver specification is not great. But it might also be hard to change it at this time given that it would cause backward incompatibilities. Also there could be multiple pointers chains so it would not be clear which position actually to take.

In the short term we probably should just fail with an unsupported operation if origin="pointer" has been specified for a scroll action. I can provide a patch for the classic specification, and also add a test for both classic and BiDi.

For a longer term solution I added an agenda item to the TPAC discussion.

Whiteboard: [webdriver:triage]

The PR for WebDriver classic is up at https://github.com/w3c/webdriver/pull/1760.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m8]
Attachment #9351470 - Attachment description: Bug 1850166 - [remote] Raise "unsupported operation" error for scroll action with origin of type "pointer". → WIP: Bug 1850166 - [remote] Raise "unsupported operation" error when "pointer" origin is used by a not "pointer" input source.
Attachment #9351471 - Attachment description: Bug 1850166 - [wdspec] Add test for "unsupported operation" for scroll action and origin type "pointer". → WIP: Bug 1850166 - [wdspec] Add test for "unsupported operation" for scroll action and origin type "pointer".
Attachment #9351470 - Attachment description: WIP: Bug 1850166 - [remote] Raise "unsupported operation" error when "pointer" origin is used by a not "pointer" input source. → Bug 1850166 - [remote] Raise "unsupported operation" error when "pointer" origin is used by a not "pointer" input source.
Attachment #9351471 - Attachment description: WIP: Bug 1850166 - [wdspec] Add test for "unsupported operation" for scroll action and origin type "pointer". → Bug 1850166 - [wdspec] Add test for "unsupported operation" for scroll action and origin type "pointer".
Blocks: 1824227
Attachment #9351470 - Attachment description: Bug 1850166 - [remote] Raise "unsupported operation" error when "pointer" origin is used by a not "pointer" input source. → Bug 1850166 - [remote] Raise "invalid argument" error when "pointer" origin is used by a "wheel" input source.
Attachment #9351471 - Attachment description: Bug 1850166 - [wdspec] Add test for "unsupported operation" for scroll action and origin type "pointer". → Bug 1850166 - [wdspec] Add test for "invalid argumnet" for wheel scroll action and origin type "pointer".
Attachment #9351471 - Attachment description: Bug 1850166 - [wdspec] Add test for "invalid argumnet" for wheel scroll action and origin type "pointer". → Bug 1850166 - [wdspec] Add test for "invalid argument" for wheel scroll action and origin type "pointer".
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/984cc66d1fc1
[remote] Raise "invalid argument" error when "pointer" origin is used by a "wheel" input source. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/d3a6da63a125
[wdspec] Add test for "invalid argument" for wheel scroll action and origin type "pointer". r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41879 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m8] → [webdriver:m8], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m8], [wptsync upstream] → [webdriver:m8][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: