pub trait BrowserTest<Context = (), TestError = Dynamic>: Send + Sync{
// 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§
Sourcefn name(&self) -> Cow<'_, str>
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.
Sourcefn 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,
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§
Sourcefn timeouts(&self) -> Option<BrowserTimeouts>
fn timeouts(&self) -> Option<BrowserTimeouts>
Optional timeouts for this test.
Returning None uses the runner’s default timeout configuration, if one is set.
Sourcefn element_query_wait(&self) -> Option<ElementQueryWaitConfig>
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.