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

@ -1,40 +1,4 @@
[arguments.py]
[test_no_such_element_with_unknown_id]
expected: FAIL
[test_no_such_element_from_other_window_handle[open\]]
expected: FAIL
[test_no_such_element_from_other_window_handle[closed\]]
expected: FAIL
[test_no_such_element_from_other_frame[open\]]
expected: FAIL
[test_no_such_element_from_other_frame[closed\]]
expected: FAIL
[test_no_such_shadow_root_with_unknown_id]
expected: FAIL
[test_no_such_shadow_root_from_other_window_handle[open\]]
expected: FAIL
[test_no_such_shadow_root_from_other_window_handle[closed\]]
expected: FAIL
[test_no_such_shadow_root_from_other_frame[open\]]
expected: FAIL
[test_no_such_shadow_root_from_other_frame[closed\]]
expected: FAIL
[test_stale_element_reference[top_context\]]
expected: FAIL
[test_stale_element_reference[child_context\]]
expected: FAIL
[test_invalid_argument_for_window_with_invalid_type[None-frame\]]
expected: FAIL
@ -73,6 +37,3 @@
[test_element_reference[shadow-root\]]
expected: FAIL
[test_element_reference[window\]]
expected: FAIL

View file

@ -1,46 +1,4 @@
[arguments.py]
[test_no_such_element_with_unknown_id]
expected: FAIL
[test_no_such_element_from_other_window_handle[open\]]
expected: FAIL
[test_no_such_element_from_other_window_handle[closed\]]
expected: FAIL
[test_no_such_element_from_other_frame[open\]]
expected: FAIL
[test_no_such_element_from_other_frame[closed\]]
expected: FAIL
[test_no_such_shadow_root_with_unknown_id]
expected: FAIL
[test_no_such_shadow_root_from_other_window_handle[open\]]
expected: FAIL
[test_no_such_shadow_root_from_other_window_handle[closed\]]
expected: FAIL
[test_no_such_shadow_root_from_other_frame[open\]]
expected: FAIL
[test_no_such_shadow_root_from_other_frame[closed\]]
expected: FAIL
[test_detached_shadow_root_reference[top_context\]]
expected: FAIL
[test_detached_shadow_root_reference[child_context\]]
expected: FAIL
[test_stale_element_reference[top_context\]]
expected: FAIL
[test_stale_element_reference[child_context\]]
expected: FAIL
[test_invalid_argument_for_window_with_invalid_type[None-frame\]]
expected: FAIL
@ -79,6 +37,3 @@
[test_element_reference[shadow-root\]]
expected: FAIL
[test_element_reference[window\]]
expected: FAIL