diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index c23315443fd..b3112f4d1fb 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -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, + ), _ => (), } } diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs index 20204e52162..7143afb2e05 100644 --- a/components/script/webdriver_handlers.rs +++ b/components/script/webdriver_handlers.rs @@ -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, diff --git a/components/shared/embedder/webdriver.rs b/components/shared/embedder/webdriver.rs index 8c7c4b2fdf6..1207182b3fa 100644 --- a/components/shared/embedder/webdriver.rs +++ b/components/shared/embedder/webdriver.rs @@ -130,7 +130,6 @@ pub enum WebDriverScriptCommand { IpcSender, ErrorStatus>>, ), FindElementElementsTagName(String, String, IpcSender, ErrorStatus>>), - FocusElement(bool, String, String, IpcSender>), ElementClick(String, IpcSender, ErrorStatus>>), GetActiveElement(IpcSender>), GetComputedRole(String, IpcSender, ErrorStatus>>), @@ -161,6 +160,7 @@ pub enum WebDriverScriptCommand { IsEnabled(String, IpcSender>), IsSelected(String, IpcSender>), GetTitle(IpcSender), + SendKeysSetup(bool, String, String, IpcSender>), } #[derive(Debug, Deserialize, Serialize)] diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index c06aa90b1e5..96051de37bd 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -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(),