mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
Change command name to WillSendKeys
Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
parent
c12e21bf3a
commit
b0fba0f110
4 changed files with 7 additions and 6 deletions
|
@ -2371,12 +2371,12 @@ impl ScriptThread {
|
|||
WebDriverScriptCommand::GetTitle(reply) => {
|
||||
webdriver_handlers::handle_get_title(&documents, pipeline_id, reply)
|
||||
},
|
||||
WebDriverScriptCommand::SendKeysSetup(
|
||||
WebDriverScriptCommand::WillSendKeys(
|
||||
strict_file_interactability,
|
||||
text,
|
||||
element_id,
|
||||
reply,
|
||||
) => webdriver_handlers::handle_send_keys_setup(
|
||||
) => webdriver_handlers::handle_will_send_keys(
|
||||
&documents,
|
||||
pipeline_id,
|
||||
element_id,
|
||||
|
|
|
@ -834,7 +834,7 @@ pub(crate) fn handle_find_element_elements_tag_name(
|
|||
.unwrap();
|
||||
}
|
||||
|
||||
pub(crate) fn handle_send_keys_setup(
|
||||
pub(crate) fn handle_will_send_keys(
|
||||
documents: &DocumentCollection,
|
||||
pipeline: PipelineId,
|
||||
element_id: String,
|
||||
|
|
|
@ -160,7 +160,8 @@ pub enum WebDriverScriptCommand {
|
|||
IsEnabled(String, IpcSender<Result<bool, ErrorStatus>>),
|
||||
IsSelected(String, IpcSender<Result<bool, ErrorStatus>>),
|
||||
GetTitle(IpcSender<String>),
|
||||
SendKeysSetup(bool, String, String, IpcSender<Result<bool, ErrorStatus>>),
|
||||
/// Match the element type before sending the event for webdriver `element send keys`.
|
||||
WillSendKeys(bool, String, String, IpcSender<Result<bool, ErrorStatus>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
|
|
@ -1617,7 +1617,7 @@ impl Handler {
|
|||
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
|
||||
let cmd = WebDriverScriptCommand::SendKeysSetup(
|
||||
let cmd = WebDriverScriptCommand::WillSendKeys(
|
||||
self.session()?.strict_file_interactability,
|
||||
keys.text.to_string(),
|
||||
element.to_string(),
|
||||
|
@ -1630,7 +1630,7 @@ impl Handler {
|
|||
|
||||
// TODO: distinguish the not found and not focusable cases
|
||||
// File input and non-typeable form control should have
|
||||
// been handled in `webdriver_handler.rs`
|
||||
// been handled in `webdriver_handler.rs`.
|
||||
if wait_for_script_response(receiver)?.map_err(|error| WebDriverError::new(error, ""))? {
|
||||
return Ok(WebDriverResponse::Void);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue