Skip to main content

WaitingExt

Trait WaitingExt 

Source
pub trait WaitingExt {
    // Required methods
    fn wait_for(
        &self,
        condition: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
    fn wait_for_text(
        &self,
        text: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
    fn wait_for_url(
        &self,
        pattern: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
    fn wait_for_load(
        &self,
        state: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
    fn wait_for_download(
        &self,
        path: Option<&str>,
    ) -> impl Future<Output = Result<String, BrowserError>> + Send;
    fn wait_for_fn(
        &self,
        js: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
    fn wait_for_state(
        &self,
        selector: &str,
        state: &str,
    ) -> impl Future<Output = Result<(), BrowserError>> + Send;
}
Expand description

Waiting operations for browser client

Required Methods§

Source

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

Wait for a condition (text, element, or timeout)

Source

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

Wait for text to appear on page

Source

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

Wait for URL pattern match

Source

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

Wait for page load state (networkidle, domcontentloaded, load)

Source

fn wait_for_download( &self, path: Option<&str>, ) -> impl Future<Output = Result<String, BrowserError>> + Send

Wait for download to complete, returns download path

Source

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

Wait for JavaScript function to return truthy value

Source

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

Wait for element state (visible, hidden, attached, detached, enabled, disabled)

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§