WebDriver - PerformActions should return InvalidArgument when passed an action sequence with an invalid id
Categories
(Testing :: geckodriver, defect, P3)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: george.roman.99, Assigned: george.roman.99)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0
Steps to reproduce:
I'm implementing actions support in Servo: https://github.com/servo/servo/pull/23805
Actual results:
No matter whether the id property exists or not, an Optional<String> is always returned:
https://searchfox.org/mozilla-central/source/testing/webdriver/src/command.rs#315
https://searchfox.org/mozilla-central/source/testing/webdriver/src/actions.rs#10
Expected results:
An InvalidArgument error should be returned when processing an action sequence with a missing or invalid id property.
Assignee | ||
Comment 1•5 years ago
|
||
Based on the WebDriver spec: https://w3c.github.io/webdriver/#dfn-process-an-input-source-action-sequence
Comment 2•5 years ago
|
||
Interesting. Does removing the Option
, and the Serde field attribute above fix it for you?
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Unfortunately I don't think that removing those fields would fix this as we need to return an InvalidArgument
error when the id
parameter is missing. Some additional check like in https://searchfox.org/mozilla-central/source/testing/webdriver/src/command.rs#306 would probably be needed.
Assignee | ||
Comment 4•5 years ago
|
||
Change ActionSequence's id field from Option<String> to String
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Backed out changeset facd6af4e16c (Bug 1568327) for wpt failures at perform_actions/key.py.
Backout: https://hg.mozilla.org/integration/autoland/rev/fbe9eff3a3fcbb59a1da95c19037d98b72d21708
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=facd6af4e16c75b19417ae5e4ef5a906aced1fa4&selectedJob=259146320
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=259146320&repo=autoland&lineNumber=88966
Comment 7•5 years ago
|
||
I totally missed that the wdspec tests and/or the webdriver client might also need an update. As it looks like the id
isn't yet or wrongly specified. The client can be found at: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/webdriver/webdriver/client.py
The wdspec tests can be run like:
$ mach wpt testing/web-platform/tests/webdriver/tests/perform_actions/ --webdriver-binary target/debug/geckodriver --webdriver-arg=-vv
Assignee | ||
Comment 8•5 years ago
|
||
I updated the revision, added a test for this particular case and now the tests pass.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
bugherder |
Description
•