mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement wb element send keys for file input (#37224)
We can now send keys to file input, which results in uploading file with given filename. Needs `pref=dom_testing_html_input_element_select_files_enabled` flag to work. https://w3c.github.io/webdriver/#element-send-keys Testing: `tests/wpt/meta/webdriver/tests/classic/element_send_keys/{events, file_upload}.py.` Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
parent
165ac32f18
commit
d66e4fc459
6 changed files with 78 additions and 55 deletions
|
@ -2280,15 +2280,6 @@ impl ScriptThread {
|
|||
can_gc,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::FocusElement(element_id, reply) => {
|
||||
webdriver_handlers::handle_focus_element(
|
||||
&documents,
|
||||
pipeline_id,
|
||||
element_id,
|
||||
reply,
|
||||
can_gc,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::ElementClick(element_id, reply) => {
|
||||
webdriver_handlers::handle_element_click(
|
||||
&documents,
|
||||
|
@ -2394,6 +2385,20 @@ impl ScriptThread {
|
|||
WebDriverScriptCommand::GetTitle(reply) => {
|
||||
webdriver_handlers::handle_get_title(&documents, pipeline_id, reply)
|
||||
},
|
||||
WebDriverScriptCommand::WillSendKeys(
|
||||
element_id,
|
||||
text,
|
||||
strict_file_interactability,
|
||||
reply,
|
||||
) => webdriver_handlers::handle_will_send_keys(
|
||||
&documents,
|
||||
pipeline_id,
|
||||
element_id,
|
||||
text,
|
||||
strict_file_interactability,
|
||||
reply,
|
||||
can_gc,
|
||||
),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue