Implement webdriver extract script arguments (#38357)

Fix script parsing step.
Implement webdriver `extract script arguments`.
Implement `deserialize_web_element` and `deserialize_shadow_root` from
script command argument.

Testing:
`/tests/wpt/tests/webdriver/tests/classic/execute_script/`
`/tests/wpt/tests/webdriver/tests/classic/execute_async_script/`

cc: @xiaochengh

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
This commit is contained in:
batu_hoang 2025-08-12 14:57:19 +08:00 committed by GitHub
parent c0d884ddb2
commit 9effdce5a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 228 additions and 169 deletions

View file

@ -210,6 +210,8 @@ pub enum WebDriverScriptCommand {
FindShadowElementsXPathSelector(String, String, IpcSender<Result<Vec<String>, ErrorStatus>>),
GetElementShadowRoot(String, IpcSender<Result<Option<String>, ErrorStatus>>),
ElementClick(String, IpcSender<Result<Option<String>, ErrorStatus>>),
GetKnownElement(String, IpcSender<Result<(), ErrorStatus>>),
GetKnownShadowRoot(String, IpcSender<Result<(), ErrorStatus>>),
GetActiveElement(IpcSender<Option<String>>),
GetComputedRole(String, IpcSender<Result<Option<String>, ErrorStatus>>),
GetCookie(