webdriver_server: Implement find element(s) from element according to spec (#37521)

Report `InvalidArgument` and `NoSuchElement` properly for [Find Element
from
Element](https://w3c.github.io/webdriver/#find-element-from-element) +
[Find Elements from
Element](https://w3c.github.io/webdriver/#find-elements-from-element)

Testing: `./mach test-wpt -r
.\tests\wpt\tests\webdriver\tests\classic\element_click
.\tests\wpt\tests\webdriver\tests\classic\find_* --product servodriver`

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-06-18 14:39:55 +08:00 committed by GitHub
parent 96ef92b9ac
commit e26532e19b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 39 deletions

View file

@ -1,5 +1,4 @@
[navigate.py]
expected: TIMEOUT
[test_numbers_link]
expected: FAIL
@ -12,21 +11,12 @@
[test_link_hash]
expected: FAIL
[test_link_from_toplevel_context_with_target[\]]
expected: FAIL
[test_link_from_toplevel_context_with_target[_blank\]]
expected: FAIL
[test_link_from_toplevel_context_with_target[_parent\]]
expected: FAIL
[test_link_from_toplevel_context_with_target[_self\]]
expected: FAIL
[test_link_from_toplevel_context_with_target[_top\]]
expected: FAIL
[test_link_from_nested_context_with_target[\]]
expected: FAIL

View file

@ -5,15 +5,6 @@
[test_no_such_element_with_shadow_root]
expected: FAIL
[test_no_such_element_with_unknown_selector[not-existent\]]
expected: FAIL
[test_no_such_element_with_unknown_selector[existent-other-frame\]]
expected: FAIL
[test_no_such_element_with_unknown_selector[existent-inside-shadow-root\]]
expected: FAIL
[test_no_such_element_with_startnode_from_other_frame]
expected: FAIL

View file

@ -11,18 +11,6 @@
[test_find_elements[xpath-//a\]]
expected: FAIL
[test_find_elements_link_text[<a href=#>link<br>text</a>-link\\ntext\]]
expected: FAIL
[test_find_elements_link_text[<a href=# style='text-transform: uppercase'>link text</a>-LINK TEXT\]]
expected: FAIL
[test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\\nt\]]
expected: FAIL
[test_find_elements_partial_link_text[<a href=# style='text-transform: uppercase'>partial link text</a>-LINK\]]
expected: FAIL
[test_xhtml_namespace[xpath-//*[name()='a'\]\]]
expected: FAIL