mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
Change wb command to SendKeysSetup, since the command is specific to SendKeys
Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
parent
9bf7c7849d
commit
a3d88a93c0
4 changed files with 17 additions and 17 deletions
|
@ -2266,20 +2266,6 @@ impl ScriptThread {
|
|||
can_gc,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::FocusElement(
|
||||
strict_file_interactability,
|
||||
text,
|
||||
element_id,
|
||||
reply,
|
||||
) => webdriver_handlers::handle_focus_element(
|
||||
&documents,
|
||||
pipeline_id,
|
||||
element_id,
|
||||
text,
|
||||
strict_file_interactability,
|
||||
reply,
|
||||
can_gc,
|
||||
),
|
||||
WebDriverScriptCommand::ElementClick(element_id, reply) => {
|
||||
webdriver_handlers::handle_element_click(
|
||||
&documents,
|
||||
|
@ -2385,6 +2371,20 @@ impl ScriptThread {
|
|||
WebDriverScriptCommand::GetTitle(reply) => {
|
||||
webdriver_handlers::handle_get_title(&documents, pipeline_id, reply)
|
||||
},
|
||||
WebDriverScriptCommand::SendKeysSetup(
|
||||
strict_file_interactability,
|
||||
text,
|
||||
element_id,
|
||||
reply,
|
||||
) => webdriver_handlers::handle_send_keys_setup(
|
||||
&documents,
|
||||
pipeline_id,
|
||||
element_id,
|
||||
text,
|
||||
strict_file_interactability,
|
||||
reply,
|
||||
can_gc,
|
||||
),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -834,7 +834,7 @@ pub(crate) fn handle_find_element_elements_tag_name(
|
|||
.unwrap();
|
||||
}
|
||||
|
||||
pub(crate) fn handle_focus_element(
|
||||
pub(crate) fn handle_send_keys_setup(
|
||||
documents: &DocumentCollection,
|
||||
pipeline: PipelineId,
|
||||
element_id: String,
|
||||
|
|
|
@ -130,7 +130,6 @@ pub enum WebDriverScriptCommand {
|
|||
IpcSender<Result<Vec<String>, ErrorStatus>>,
|
||||
),
|
||||
FindElementElementsTagName(String, String, IpcSender<Result<Vec<String>, ErrorStatus>>),
|
||||
FocusElement(bool, String, String, IpcSender<Result<bool, ErrorStatus>>),
|
||||
ElementClick(String, IpcSender<Result<Option<String>, ErrorStatus>>),
|
||||
GetActiveElement(IpcSender<Option<String>>),
|
||||
GetComputedRole(String, IpcSender<Result<Option<String>, ErrorStatus>>),
|
||||
|
@ -161,6 +160,7 @@ 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>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
|
|
@ -1617,7 +1617,7 @@ impl Handler {
|
|||
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
|
||||
let cmd = WebDriverScriptCommand::FocusElement(
|
||||
let cmd = WebDriverScriptCommand::SendKeysSetup(
|
||||
self.session()?.strict_file_interactability,
|
||||
keys.text.to_string(),
|
||||
element.to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue