webdriver_server

Struct Handler

source
pub(crate) struct Handler {
    pub(crate) load_status_receiver: Receiver<LoadStatus>,
    pub(crate) load_status_sender: IpcSender<LoadStatus>,
    pub(crate) session: Option<WebDriverSession>,
    pub(crate) constellation_chan: Sender<ConstellationMsg>,
    pub(crate) resize_timeout: u32,
}

Fields§

§load_status_receiver: Receiver<LoadStatus>

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: IpcSender<LoadStatus>

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>§constellation_chan: Sender<ConstellationMsg>§resize_timeout: u32

Implementations§

source§

impl Handler

source

pub(crate) fn dispatch_actions( &mut self, actions_by_tick: &[ActionSequence], ) -> Result<(), ErrorStatus>

source

fn dispatch_general_action(&mut self, source_id: &str)

source

fn dispatch_tick_actions( &mut self, tick_actions: &ActionSequence, tick_duration: u64, ) -> Result<(), ErrorStatus>

source

fn dispatch_keydown_action(&mut self, source_id: &str, action: &KeyDownAction)

source

fn dispatch_keyup_action(&mut self, source_id: &str, action: &KeyUpAction)

source

pub(crate) fn dispatch_pointerdown_action( &mut self, source_id: &str, action: &PointerDownAction, )

source

pub(crate) fn dispatch_pointerup_action( &mut self, source_id: &str, action: &PointerUpAction, )

source

pub(crate) fn dispatch_pointermove_action( &mut self, source_id: &str, action: &PointerMoveAction, tick_duration: u64, ) -> Result<(), ErrorStatus>

source

fn perform_pointer_move( &mut self, source_id: &str, duration: u64, start_x: i64, start_y: i64, target_x: i64, target_y: i64, tick_start: Instant, )

source§

impl Handler

source

pub fn new(constellation_chan: Sender<ConstellationMsg>) -> Handler

source

pub(crate) fn focus_top_level_browsing_context_id( &self, ) -> WebDriverResult<TopLevelBrowsingContextId>

source

pub(crate) fn session(&self) -> WebDriverResult<&WebDriverSession>

source

pub(crate) fn session_mut(&mut self) -> WebDriverResult<&mut WebDriverSession>

source

pub(crate) fn handle_new_session( &mut self, parameters: &NewSessionParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_delete_session( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_status(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn browsing_context_script_command( &self, cmd_msg: WebDriverScriptCommand, ) -> WebDriverResult<()>

source

pub(crate) fn top_level_script_command( &self, cmd_msg: WebDriverScriptCommand, ) -> WebDriverResult<()>

source

pub(crate) fn handle_get( &self, parameters: &GetParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn wait_for_load(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_current_url(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_window_size(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_set_window_size( &self, params: &WindowRectParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_is_enabled( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_is_selected( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_go_back(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_go_forward(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_refresh(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_title(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_window_handle(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_window_handles(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_find_element( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_close_window( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_new_window( &mut self, _parameters: &NewWindowParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_switch_to_frame( &mut self, parameters: &SwitchToFrameParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_switch_to_parent_frame( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_switch_to_window( &mut self, parameters: &SwitchToWindowParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn switch_to_frame( &mut self, frame_id: WebDriverFrameId, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_find_elements( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_find_element_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_find_elements_from_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_rect( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_text( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_active_element(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_tag_name( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_attribute( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_property( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_css( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_get_cookies(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_delete_cookies(&self) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_dismiss_alert( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_get_timeouts( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_set_timeouts( &mut self, parameters: &TimeoutsParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_get_page_source( &self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_perform_actions( &mut self, parameters: &ActionsParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_release_actions( &mut self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_execute_script( &self, parameters: &JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_execute_async_script( &self, parameters: &JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn postprocess_js_result( &self, result: WebDriverJSResult, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_send_keys( &self, element: &WebElement, keys: &SendKeysParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_element_click( &mut self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn take_screenshot( &self, rect: Option<Rect<f32, CSSPixel>>, ) -> WebDriverResult<String>

source

pub(crate) fn handle_take_screenshot( &self, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_take_element_screenshot( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_get_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_set_prefs( &self, parameters: &SetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>

source

pub(crate) fn handle_reset_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T

source§

impl<T> WasmNotSend for T
where T: Send,