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§
Sourcefn click(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn click( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Click an element by selector
Sourcefn dblclick(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn dblclick( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Double-click an element
Sourcefn fill(
&self,
selector: &str,
text: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn fill( &self, selector: &str, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Fill a form field with text
Sourcefn type_text(
&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
Type text into an element (character by character)
Sourcefn press(
&self,
key: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn press( &self, key: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Press a keyboard key
Sourcefn hover(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn hover( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Hover over an element
Sourcefn select_option(
&self,
selector: &str,
value: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn select_option( &self, selector: &str, value: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Select an option in a dropdown
Sourcefn focus(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn focus( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Focus an element
Sourcefn check(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn check( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Check a checkbox
Sourcefn uncheck(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn uncheck( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Uncheck a checkbox
Sourcefn scrollintoview(
&self,
selector: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn scrollintoview( &self, selector: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Scroll an element into view
Sourcefn drag(
&self,
source: &str,
target: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn drag( &self, source: &str, target: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Drag and drop from source to destination
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.