Skip to main content

InteractionExt

Trait InteractionExt 

Source
pub trait InteractionExt {
Show 14 methods // Required methods fn click( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn dblclick( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn fill( &self, selector: &str, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn type_text( &self, selector: &str, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn press( &self, key: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn hover( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn select_option( &self, selector: &str, value: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn focus( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn check( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn uncheck( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn scrollintoview( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn drag( &self, source: &str, target: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn upload( &self, selector: &str, files: &[&str], ) -> impl Future<Output = Result<(), BrowserError>> + Send; fn scroll( &self, direction: &str, pixels: Option<u32>, ) -> impl Future<Output = Result<(), BrowserError>> + Send;
}
Expand description

Interaction operations for browser client

Required Methods§

Source

fn click( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Click an element by selector

Source

fn dblclick( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Double-click an element

Source

fn fill( &self, selector: &str, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Fill a form field with text

Source

fn type_text( &self, selector: &str, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Type text into an element (character by character)

Source

fn press( &self, key: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Press a keyboard key

Source

fn hover( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Hover over an element

Source

fn select_option( &self, selector: &str, value: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Select an option in a dropdown

Source

fn focus( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Focus an element

Source

fn check( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Check a checkbox

Source

fn uncheck( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Uncheck a checkbox

Source

fn scrollintoview( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Scroll an element into view

Source

fn drag( &self, source: &str, target: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Drag and drop from source to destination

Source

fn upload( &self, selector: &str, files: &[&str], ) -> impl Future<Output = Result<(), BrowserError>> + Send

Upload files to a file input

Source

fn scroll( &self, direction: &str, pixels: Option<u32>, ) -> impl Future<Output = Result<(), BrowserError>> + Send

Scroll the page

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§