mirror of
https://github.com/servo/servo.git
synced 2025-06-26 01:54:33 +01:00
[WebDriver] Properly report error for find_element
& find_elements
; Get correct visible text when matching links (#37452)
1. Properly report new types of errors for `find_element` and `find_elements`. Previously never reported. 1.1. `InvalidSelector` 1.2. `NoSuchElement` 1.3. `InvalidArgument` 2. Get the visible text for `<a>` correctly in `script::webdriver_handler` so that matching would work. Testing: `./mach test-wpt -r --log-raw "D:\servo test log\all.txt" webdriver/tests/classic/find_element/find.py webdriver/tests/classic/find_elements/find.py --product servodriver` --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
62b078dd62
commit
f8f7c6ebd1
5 changed files with 138 additions and 122 deletions
|
@ -2278,6 +2278,7 @@ impl ScriptThread {
|
|||
selector,
|
||||
partial,
|
||||
reply,
|
||||
can_gc,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::FindElementTagName(selector, reply) => {
|
||||
|
@ -2304,6 +2305,7 @@ impl ScriptThread {
|
|||
selector,
|
||||
partial,
|
||||
reply,
|
||||
can_gc,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::FindElementsTagName(selector, reply) => {
|
||||
|
@ -2336,6 +2338,7 @@ impl ScriptThread {
|
|||
selector,
|
||||
partial,
|
||||
reply,
|
||||
can_gc,
|
||||
),
|
||||
WebDriverScriptCommand::FindElementElementTagName(selector, element_id, reply) => {
|
||||
webdriver_handlers::handle_find_element_element_tag_name(
|
||||
|
@ -2368,6 +2371,7 @@ impl ScriptThread {
|
|||
selector,
|
||||
partial,
|
||||
reply,
|
||||
can_gc,
|
||||
),
|
||||
WebDriverScriptCommand::FindElementElementsTagName(selector, element_id, reply) => {
|
||||
webdriver_handlers::handle_find_element_elements_tag_name(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue