[WebDriver] Implement XPath Locator Strategy (#37783)

1. Implement XPath Locator Strategy
2. Use it for "Find Element(s)", "Find Element(s) from Element", "Find
Element(s) from Shadow Root"

Testing: `tests\wpt\tests\webdriver\tests\classic\find_element*\find.py`

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-07-01 01:20:52 +08:00 committed by GitHub
parent f682f9d6f5
commit d781d1b1cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 190 additions and 51 deletions

View file

@ -1,12 +1,3 @@
[find.py]
[test_no_browsing_context]
expected: FAIL
[test_find_element[xpath-//a\]]
expected: FAIL
[test_xhtml_namespace[xpath-//*[name()='a'\]\]]
expected: FAIL
[test_htmldocument[xpath-/html\]]
expected: FAIL

View file

@ -2,12 +2,6 @@
[test_no_browsing_context]
expected: FAIL
[test_find_element[xpath-//a\]]
expected: FAIL
[test_xhtml_namespace[xpath-//*[name()='a'\]\]]
expected: FAIL
[test_parent_htmldocument]
expected: FAIL

View file

@ -2,9 +2,6 @@
[test_no_browsing_context]
expected: FAIL
[test_find_element[open-xpath-//a\]]
expected: FAIL
[test_find_element[closed-css selector-#linkText\]]
expected: FAIL

View file

@ -1,12 +1,3 @@
[find.py]
[test_no_browsing_context]
expected: FAIL
[test_find_elements[xpath-//a\]]
expected: FAIL
[test_xhtml_namespace[xpath-//*[name()='a'\]\]]
expected: FAIL
[test_htmldocument[xpath-/html\]]
expected: FAIL

View file

@ -2,12 +2,6 @@
[test_no_browsing_context]
expected: FAIL
[test_find_elements[xpath-//a\]]
expected: FAIL
[test_xhtml_namespace[xpath-//*[name()='a'\]\]]
expected: FAIL
[test_parent_htmldocument]
expected: FAIL

View file

@ -2,9 +2,6 @@
[test_no_browsing_context]
expected: FAIL
[test_find_elements[open-xpath-//a\]]
expected: FAIL
[test_find_elements[closed-css selector-#linkText\]]
expected: FAIL