pub(crate) struct Handler {
pub(crate) load_status_receiver: RoutedReceiver<WebDriverLoadStatus>,
pub(crate) load_status_sender: GenericSender<WebDriverLoadStatus>,
pub(crate) session: Option<WebDriverSession>,
pub(crate) embedder_sender: Sender<WebDriverCommandMsg>,
pub(crate) event_loop_waker: Box<dyn EventLoopWaker>,
pub(crate) pending_input_event_receivers: Vec<Receiver<()>>,
pub(crate) pending_actions: Vec<PendingActions>,
pub(crate) default_preferences: Preferences,
}Fields§
§load_status_receiver: RoutedReceiver<WebDriverLoadStatus>The threaded receiver on which we can block for a load-status. It will receive messages sent on the load_status_sender, and forwarded by the IPC router.
load_status_sender: GenericSender<WebDriverLoadStatus>The IPC sender which we can clone and pass along to the constellation, for it to send us a load-status. Messages sent on it will be forwarded to the load_status_receiver.
session: Option<WebDriverSession>§embedder_sender: Sender<WebDriverCommandMsg>A Sender that sends messages to the embedder that this `WebDriver instance controls.
In addition to sending a message, we must always wake up the embedder’s event loop so it
knows that more messages are available for processing.
event_loop_waker: Box<dyn EventLoopWaker>An EventLoopWaker which is used to wake up the embedder event loop.
pending_input_event_receivers: Vec<Receiver<()>>A list of Receivers that are used to track when input events are handled in the DOM.
Once these receivers receive a response, we know that the event has been handled.
TODO: Once we upgrade crossbeam-channel this can be replaced with a WaitGroup.
pending_actions: Vec<PendingActions>Ongoing PointerMoveAction or [WheelScrollAction] that are being incrementally
processed across multiple execution cycles within the current tick.
default_preferences: PreferencesThe base set of preferences to treat as default when resetting.
Implementations§
Source§impl Handler
impl Handler
Sourcepub(crate) fn dispatch_actions(
&mut self,
actions_by_tick: Vec<Vec<(String, ActionItem)>>,
browsing_context: BrowsingContextId,
) -> Result<(), ErrorStatus>
pub(crate) fn dispatch_actions( &mut self, actions_by_tick: Vec<Vec<(String, ActionItem)>>, browsing_context: BrowsingContextId, ) -> Result<(), ErrorStatus>
https://w3c.github.io/webdriver/#dfn-dispatch-actions https://w3c.github.io/webdriver/#dfn-dispatch-actions-inner For Servo, “dispatch actions” is identical to “dispatch actions inner”, as they are only different for a session that can run commands in parallel.
Sourcefn process_pending_actions(&mut self, tick_start: &Instant)
fn process_pending_actions(&mut self, tick_start: &Instant)
https://w3c.github.io/webdriver/#dfn-perform-a-pointer-move Step 9. Run the following substeps in parallel: Step 9.1. Asynchronously wait for an implementation defined amount of time to pass. Step 9.2. Perform a pointer move with arguments input state, duration, start x, start y, target x, target y. https://w3c.github.io/webdriver/#dfn-perform-a-scroll Step 7. Run the following substeps in parallel: Step 7.1. Asynchronously wait for an implementation defined amount of time to pass. Step 7.2. Perform a scroll with arguments duration, x, y, target delta x, target delta y, current delta x, current delta y.
fn wait_for_input_event_handled(&mut self) -> Result<(), ErrorStatus>
Sourcefn dispatch_tick_actions(
&mut self,
tick_actions: &Vec<(String, ActionItem)>,
tick_duration: u64,
tick_start: &Instant,
) -> Result<(), ErrorStatus>
fn dispatch_tick_actions( &mut self, tick_actions: &Vec<(String, ActionItem)>, tick_duration: u64, tick_start: &Instant, ) -> Result<(), ErrorStatus>
Sourcefn dispatch_pause_action(&mut self, _input_id: &str)
fn dispatch_pause_action(&mut self, _input_id: &str)
https://w3c.github.io/webdriver/#dfn-dispatch-a-pause-action
This is a dummy action. The sole effect of the action is that
its duration parameter may decide “tick duration”.
Sourcefn dispatch_keydown_action(&mut self, input_id: &str, action: &KeyDownAction)
fn dispatch_keydown_action(&mut self, input_id: &str, action: &KeyDownAction)
Sourcefn dispatch_keyup_action(&mut self, input_id: &str, action: &KeyUpAction)
fn dispatch_keyup_action(&mut self, input_id: &str, action: &KeyUpAction)
Sourcefn dispatch_pointercancel_action(&mut self, source_id: &str)
fn dispatch_pointercancel_action(&mut self, source_id: &str)
Sourcefn dispatch_pointerdown_action(
&mut self,
input_id: &str,
action: &PointerDownAction,
)
fn dispatch_pointerdown_action( &mut self, input_id: &str, action: &PointerDownAction, )
Sourcefn dispatch_pointerup_action(
&mut self,
input_id: &str,
action: &PointerUpAction,
)
fn dispatch_pointerup_action( &mut self, input_id: &str, action: &PointerUpAction, )
Sourcefn dispatch_pointermove_action(
&mut self,
input_id: &str,
action: &PointerMoveAction,
tick_duration: u64,
tick_start: &Instant,
) -> Result<(), ErrorStatus>
fn dispatch_pointermove_action( &mut self, input_id: &str, action: &PointerMoveAction, tick_duration: u64, tick_start: &Instant, ) -> Result<(), ErrorStatus>
Sourcefn perform_pointer_move(
&mut self,
input_id: &str,
duration: u64,
start_x: f64,
start_y: f64,
target_x: f64,
target_y: f64,
tick_start: &Instant,
)
fn perform_pointer_move( &mut self, input_id: &str, duration: u64, start_x: f64, start_y: f64, target_x: f64, target_y: f64, tick_start: &Instant, )
Sourcefn dispatch_scroll_action(
&mut self,
input_id: &str,
action: &WheelScrollAction,
tick_duration: u64,
tick_start: &Instant,
) -> Result<(), ErrorStatus>
fn dispatch_scroll_action( &mut self, input_id: &str, action: &WheelScrollAction, tick_duration: u64, tick_start: &Instant, ) -> Result<(), ErrorStatus>
Sourcefn perform_scroll(
&mut self,
input_id: &str,
duration: u64,
x: f64,
y: f64,
target_delta_x: f64,
target_delta_y: f64,
current_delta_x: f64,
current_delta_y: f64,
tick_start: &Instant,
)
fn perform_scroll( &mut self, input_id: &str, duration: u64, x: f64, y: f64, target_delta_x: f64, target_delta_y: f64, current_delta_x: f64, current_delta_y: f64, tick_start: &Instant, )
Sourcefn check_viewport_bound(&self, x: f64, y: f64) -> Result<(), ErrorStatus>
fn check_viewport_bound(&self, x: f64, y: f64) -> Result<(), ErrorStatus>
Verify that the given coordinates are within the boundary of the viewport. If x or y is less than 0 or greater than the width of the viewport in CSS pixels, then return error with error code move target out of bounds.
Sourcepub(crate) fn get_origin_relative_coordinates(
&self,
origin: &PointerOrigin,
x_offset: f64,
y_offset: f64,
input_id: &str,
) -> Result<(f64, f64), ErrorStatus>
pub(crate) fn get_origin_relative_coordinates( &self, origin: &PointerOrigin, x_offset: f64, y_offset: f64, input_id: &str, ) -> Result<(f64, f64), ErrorStatus>
Sourcefn get_element_in_view_center_point(
&self,
web_element: &WebElement,
) -> Result<(i64, i64), ErrorStatus>
fn get_element_in_view_center_point( &self, web_element: &WebElement, ) -> Result<(i64, i64), ErrorStatus>
Sourcepub(crate) fn extract_an_action_sequence(
&mut self,
actions: Vec<ActionSequence>,
) -> Vec<Vec<(String, ActionItem)>>
pub(crate) fn extract_an_action_sequence( &mut self, actions: Vec<ActionSequence>, ) -> Vec<Vec<(String, ActionItem)>>
Sourcefn process_an_input_source_action_sequence(
&mut self,
action_sequence: ActionSequence,
) -> Vec<ActionItem>
fn process_an_input_source_action_sequence( &mut self, action_sequence: ActionSequence, ) -> Vec<ActionItem>
fn input_state_table_mut(&mut self) -> &mut HashMap<String, InputSourceState>
fn get_pointer_input_state_mut( &mut self, input_id: &str, ) -> &mut PointerInputState
fn get_pointer_input_state(&self, input_id: &str) -> &PointerInputState
Source§impl Handler
impl Handler
Sourcepub(crate) fn extract_script_arguments(
&self,
parameters: JavascriptCommandParameters,
) -> WebDriverResult<(String, Vec<String>)>
pub(crate) fn extract_script_arguments( &self, parameters: JavascriptCommandParameters, ) -> WebDriverResult<(String, Vec<String>)>
Sourcefn deserialize_web_element(&self, element: &Value) -> WebDriverResult<String>
fn deserialize_web_element(&self, element: &Value) -> WebDriverResult<String>
Sourcefn deserialize_shadow_root(
&self,
shadow_root: &Value,
) -> WebDriverResult<String>
fn deserialize_shadow_root( &self, shadow_root: &Value, ) -> WebDriverResult<String>
Sourcefn deserialize_web_frame(&self, frame: &Value) -> WebDriverResult<String>
fn deserialize_web_frame(&self, frame: &Value) -> WebDriverResult<String>
Sourcefn deserialize_web_window(&self, window: &Value) -> WebDriverResult<String>
fn deserialize_web_window(&self, window: &Value) -> WebDriverResult<String>
Source§impl Handler
impl Handler
Sourcepub(crate) fn create_session(
&mut self,
capabilities: &mut Map<String, Value>,
servo_capabilities: &ServoCapabilities,
) -> WebDriverResult<Uuid>
pub(crate) fn create_session( &mut self, capabilities: &mut Map<String, Value>, servo_capabilities: &ServoCapabilities, ) -> WebDriverResult<Uuid>
Source§impl Handler
impl Handler
Sourcepub(crate) fn handle_dismiss_alert(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_dismiss_alert(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_accept_alert(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_accept_alert(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_get_alert_text(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_alert_text(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_send_alert_text(
&self,
text: String,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_send_alert_text( &self, text: String, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_any_user_prompts(
&self,
webview_id: WebViewId,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_any_user_prompts( &self, webview_id: WebViewId, ) -> WebDriverResult<WebDriverResponse>
Source§impl Handler
impl Handler
pub(crate) fn new( embedder_sender: Sender<WebDriverCommandMsg>, event_loop_waker: Box<dyn EventLoopWaker>, default_preferences: Preferences, ) -> Handler
pub(crate) fn browsing_context_id(&self) -> WebDriverResult<BrowsingContextId>
pub(crate) fn webview_id(&self) -> WebDriverResult<WebViewId>
pub(crate) fn send_input_event_to_embedder(&self, input_event: InputEvent)
pub(crate) fn send_blocking_input_event_to_embedder( &mut self, input_event: InputEvent, )
pub(crate) fn send_message_to_embedder( &self, msg: WebDriverCommandMsg, ) -> WebDriverResult<()>
pub(crate) fn add_load_status_sender(&self) -> WebDriverResult<()>
pub(crate) fn clear_load_status_sender(&self) -> WebDriverResult<()>
pub(crate) fn verified_webview_id(&self) -> WebViewId
pub(crate) fn focused_webview_id(&self) -> WebDriverResult<Option<WebViewId>>
pub(crate) fn session(&self) -> WebDriverResult<&WebDriverSession>
pub(crate) fn session_mut(&mut self) -> WebDriverResult<&mut WebDriverSession>
Sourcepub(crate) fn handle_new_session(
&mut self,
parameters: &NewSessionParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_new_session( &mut self, parameters: &NewSessionParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_delete_session(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_delete_session( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_status(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_status(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn browsing_context_script_command(
&self,
cmd_msg: WebDriverScriptCommand,
verify: VerifyBrowsingContextIsOpen,
) -> WebDriverResult<()>
pub(crate) fn browsing_context_script_command( &self, cmd_msg: WebDriverScriptCommand, verify: VerifyBrowsingContextIsOpen, ) -> WebDriverResult<()>
Send command to Script Thread with session’s current browsing context.
If verify is VerifyBrowsingContextIsOpen::Yes,
it would verify the existence of browsing context before sending.
Sourcepub(crate) fn top_level_script_command(
&self,
cmd_msg: WebDriverScriptCommand,
verify: VerifyBrowsingContextIsOpen,
) -> WebDriverResult<()>
pub(crate) fn top_level_script_command( &self, cmd_msg: WebDriverScriptCommand, verify: VerifyBrowsingContextIsOpen, ) -> WebDriverResult<()>
Send command to Script Thread with session’s current top-level browsing context.
If verify is VerifyBrowsingContextIsOpen::Yes,
it would verify the existence of top-level browsing context before sending.
Sourcepub(crate) fn handle_get(
&mut self,
parameters: &GetParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get( &mut self, parameters: &GetParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn wait_document_ready( &self, timeout: Option<u64>, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_current_url(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_current_url(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_window_rect(
&self,
verify: VerifyBrowsingContextIsOpen,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_rect( &self, verify: VerifyBrowsingContextIsOpen, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_set_window_rect(
&self,
params: &WindowRectParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_window_rect( &self, params: &WindowRectParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_maximize_window(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_maximize_window( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_is_enabled( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_is_selected( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_go_back(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_go_back(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_go_forward(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_go_forward(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_refresh(&mut self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_refresh(&mut self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_title(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_title(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_window_handle(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_handle( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_window_handles(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_handles( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn get_window_handle( &mut self, webview_id: WebViewId, ) -> Option<String>
pub(crate) fn get_window_handles(&self) -> Vec<String>
pub(crate) fn get_all_webview_ids(&self) -> Vec<WebViewId>
Sourcepub(crate) fn handle_close_window(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_close_window( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_new_window(
&mut self,
parameters: &NewWindowParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_new_window( &mut self, parameters: &NewWindowParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_switch_to_frame(
&mut self,
parameters: &SwitchToFrameParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_frame( &mut self, parameters: &SwitchToFrameParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_switch_to_parent_frame(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_parent_frame( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_switch_to_window(
&mut self,
parameters: &SwitchToWindowParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_window( &mut self, parameters: &SwitchToWindowParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn switch_to_frame( &mut self, frame_id: WebDriverFrameId, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_find_element(
&self,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_element( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn implicit_wait<T>(
&self,
callback: impl Fn() -> Result<(bool, T), (bool, WebDriverError)>,
) -> Result<T, WebDriverError>
pub(crate) fn implicit_wait<T>( &self, callback: impl Fn() -> Result<(bool, T), (bool, WebDriverError)>, ) -> Result<T, WebDriverError>
The boolean in callback result indicates whether implicit_wait can early return before timeout with current result.
Sourcepub(crate) fn handle_find_elements(
&self,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_elements( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_find_element_from_element(
&self,
element: &WebElement,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_element_from_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_find_elements_from_element(
&self,
element: &WebElement,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_elements_from_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_find_elements_from_shadow_root(
&self,
shadow_root: &ShadowRoot,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_elements_from_shadow_root( &self, shadow_root: &ShadowRoot, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_find_element_from_shadow_root(
&self,
shadow_root: &ShadowRoot,
parameters: &LocatorParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_element_from_shadow_root( &self, shadow_root: &ShadowRoot, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_get_shadow_root(
&self,
element: WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_shadow_root( &self, element: WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_rect(
&self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_rect( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_text(
&self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_text( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_active_element(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_active_element(&self) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_computed_role(
&self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_computed_role( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_tag_name(
&self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_tag_name( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_attribute(
&self,
element: &WebElement,
name: &str,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_attribute( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_property(
&self,
element: &WebElement,
name: &str,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_property( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_css(
&self,
element: &WebElement,
name: &str,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_css( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_get_timeouts(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_timeouts( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_set_timeouts(
&mut self,
parameters: &TimeoutsParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_timeouts( &mut self, parameters: &TimeoutsParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_get_page_source(
&self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_page_source( &self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_perform_actions(
&mut self,
parameters: ActionsParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_perform_actions( &mut self, parameters: ActionsParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_release_actions(
&mut self,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_release_actions( &mut self, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_execute_script(
&self,
parameters: JavascriptCommandParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_execute_script( &self, parameters: JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_execute_async_script( &self, parameters: JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn javascript_evaluation_result_to_webdriver_response( &self, result: WebDriverJSResult, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_send_keys(
&mut self,
element: &WebElement,
keys: &SendKeysParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_send_keys( &mut self, element: &WebElement, keys: &SendKeysParameters, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_clear(
&self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_clear( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_element_click(
&mut self,
element: &WebElement,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_click( &mut self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn perform_element_click(
&mut self,
element: String,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn perform_element_click( &mut self, element: String, ) -> WebDriverResult<WebDriverResponse>
https://w3c.github.io/webdriver/#element-click Step 8 for elements other than
pub(crate) fn take_screenshot( &self, rect: Option<Rect<f32, CSSPixel>>, ) -> WebDriverResult<String>
pub(crate) fn handle_take_screenshot( &self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_take_element_screenshot( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
Sourcepub(crate) fn handle_custom_handlers_set_mode(
&self,
parameters: &CustomHandlersSetModeParameters,
) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_custom_handlers_set_mode( &self, parameters: &CustomHandlersSetModeParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_prefs( &self, parameters: &SetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_reset_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_shutdown(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn verify_top_level_browsing_context_is_open( &self, webview_id: WebViewId, ) -> Result<(), WebDriverError>
pub(crate) fn verify_browsing_context_is_open( &self, browsing_context_id: BrowsingContextId, ) -> Result<(), WebDriverError>
pub(crate) fn wait_until_browsing_context_is_open( &self, browsing_context_id: BrowsingContextId, ) -> WebDriverResult<()>
pub(crate) fn focus_webview(&self, webview_id: WebViewId) -> WebDriverResult<()>
pub(crate) fn focus_browsing_context( &self, browsing_cotext_id: BrowsingContextId, ) -> WebDriverResult<()>
Trait Implementations§
Source§impl WebDriverHandler<ServoExtensionRoute> for Handler
impl WebDriverHandler<ServoExtensionRoute> for Handler
fn handle_command( &mut self, _session: &Option<Session>, msg: WebDriverMessage<ServoExtensionRoute>, ) -> WebDriverResult<WebDriverResponse>
fn teardown_session(&mut self, _session: SessionTeardownKind)
Auto Trait Implementations§
impl Freeze for Handler
impl !RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnsafeUnpin for Handler
impl !UnwindSafe for Handler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more