public class WebTasks extends Object
WebTask
's.
Inspired by WebDriver's ExpectedConditions
.
It includes factory methods for creating BDD-style tasks, following the
Given When Then pattern:
given(WebTask...)
, when(WebTask...)
, then(WebTask...)
.
They are simply CompositeWebTask
's, but feature a meaningful
name which helps improving the readability of tests.
Modifier | Constructor and Description |
---|---|
protected |
WebTasks() |
Modifier and Type | Method and Description |
---|---|
static CompositeWebTask |
composite(WebTask... components) |
static CompositeWebTask |
given(WebTask... givens)
A BDD Given step.
|
static WebTask |
nullTask()
Task that does nothing, and "finally" returns the very initial page.
|
static WebTask |
sleepFor(int seconds)
Task that sleeps for the given number of seconds,
and finally returns the very initial page.
|
static CompositeWebTask |
then(WebTask... thens)
A BDD Then step.
|
static CompositeWebTask |
when(WebTask... whens)
A BDD When step.
|
public static WebTask nullTask()
public static WebTask sleepFor(int seconds)
public static CompositeWebTask composite(WebTask... components)
CompositeWebTask
made up of the componentspublic static CompositeWebTask given(WebTask... givens)
givens
- the tasks implementing the steps to satisfy
the pre-conditions of a testCompositeWebTask
made up of the givenspublic static CompositeWebTask when(WebTask... whens)
whens
- the tasks implementing the trigger for a testCompositeWebTask
made up of the whenspublic static CompositeWebTask then(WebTask... thens)
thens
- the tasks implementing the verification steps for a testCompositeWebTask
made up of the thensCopyright © 2015. All rights reserved.