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§
Sourcefn wait_for(
&self,
condition: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn wait_for( &self, condition: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Wait for a condition (text, element, or timeout)
Sourcefn wait_for_text(
&self,
text: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn wait_for_text( &self, text: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Wait for text to appear on page
Sourcefn wait_for_url(
&self,
pattern: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn wait_for_url( &self, pattern: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Wait for URL pattern match
Sourcefn wait_for_load(
&self,
state: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn wait_for_load( &self, state: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Wait for page load state (networkidle, domcontentloaded, load)
Sourcefn wait_for_download(
&self,
path: Option<&str>,
) -> impl Future<Output = Result<String, BrowserError>> + Send
fn wait_for_download( &self, path: Option<&str>, ) -> impl Future<Output = Result<String, BrowserError>> + Send
Wait for download to complete, returns download path
Sourcefn wait_for_fn(
&self,
js: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
fn wait_for_fn( &self, js: &str, ) -> impl Future<Output = Result<(), BrowserError>> + Send
Wait for JavaScript function to return truthy value
Sourcefn wait_for_state(
&self,
selector: &str,
state: &str,
) -> impl Future<Output = Result<(), BrowserError>> + Send
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.