"script.callFunction" has to fail with "no such handle" error if the handle of an object as passed as argument is unknown
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(firefox113 fixed)
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | fixed |
People
(Reporter: whimboo, Assigned: sairaabdullapa, Mentored)
References
()
Details
(Whiteboard: [webdriver:m6][webdriver:external][lang=js][wptsync upstream] [webdriver:relnote])
Attachments
(2 files)
As per the WebDriver BiDi spec the handle of an object needs to be known if given. If it's not known within the given Realm, a no such handle error needs to be raised.
Right now we raise an invalid argument error instead. When fixing that we need browser chrome as well as wdspec tests.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 2•2 years ago
|
||
Sure, and thank you for your interest! In the following some information in how to get this fixed.
An example of using a handle can be found in the webdriver BiDi tests for callFunction within arguments.py. It basically means that a strong reference of a Javascript object gets created within the browser by some script evaluation, which then later on can be referred via callFunction.
Steps to do here would be:
-
Create a new test within invalid.py right under the test
test_params_arguments_handle_invalid_typeand name ittest_params_arguments_handle_unknown_value. Here a string value needs to be passed ashandletocallFunctionthat is randomly set, eg.foo. -
Run the given test by specifying the exact path and notice that it doesn't fail with a
no such handlefailure butinvalid argument. -
Fix the problem with the deserialization in RemoteValue.sys.mjs so that the correct error is thrown. It needs to behave similar as
InvalidArgumentError. -
Ensure to also add the new error type to the WebDriver BiDi Python client so that the test can correctly assert the expected error type.
If you have questions don't hesitate to ask, or even better join us on Matrix in the webdriver channel.
Updated•2 years ago
|
| Reporter | ||
Comment 6•2 years ago
|
||
Comment 8•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/513e167dd843
https://hg.mozilla.org/mozilla-central/rev/3b9301f49922
Updated•2 years ago
|
Updated•2 years ago
|
| Reporter | ||
Updated•9 months ago
|
Description
•