Skip to main content

BrowserTest

Trait BrowserTest 

Source
pub trait BrowserTest<Context = (), TestError = Dynamic>: Send + Sync
where Context: Sync + ?Sized, TestError: ?Sized,
{ // Required methods fn name(&self) -> Cow<'_, str>; fn run<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, driver: &'life1 WebDriver, context: &'life2 Context, ) -> Pin<Box<dyn Future<Output = Result<(), Report<TestError>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided methods fn timeouts(&self) -> Option<BrowserTimeouts> { ... } fn element_query_wait(&self) -> Option<ElementQueryWaitConfig> { ... } }
Expand description

A browser test that can run against one fresh WebDriver session.

Required Methods§

Source

fn name(&self) -> Cow<'_, str>

A human-readable test name for logs and failure context.

The runner owns the returned name before running the test body, so implementations may return either a borrowed name stored on the test or a freshly generated owned name.

Source

fn run<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, driver: &'life1 WebDriver, context: &'life2 Context, ) -> Pin<Box<dyn Future<Output = Result<(), Report<TestError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute the test body.

Provided Methods§

Source

fn timeouts(&self) -> Option<BrowserTimeouts>

Optional timeouts for this test.

Returning None uses the runner’s default timeout configuration, if one is set.

Source

fn element_query_wait(&self) -> Option<ElementQueryWaitConfig>

Optional element query wait configuration for this test.

Returning None uses the runner’s default element query wait configuration, if one is set.

Implementors§