public interface WebTask
WebTask uses page objects to carry on its logic.
It is the gate between the layer 'tests' and 'pages', the one
that makes for maintainable test suites.
In fact, it allows for sharing code among tests.
Each concrete WebTask should be as fine-grained as possible:
the finer, the more reusable, the better.
Fine-grained WebTask's can be then chained together, thanks to
Each WebTask in a chain is able to continue the interaction with the SUT
from the page the previous task was visiting.
Concrete WebTask's should be parametrized by fields: they should define a field for each piece of test data they need, along with a fluent setter method. Test data should be stored (statically, i.e. hardcoded, or dynamically, e.g. in a DB) in test classes and passed to WebTask's via the fluent setter methods.
|Modifier and Type||Method and Description|
Perform this task as the user
getUser(). Precondition: the user must have already been set (see
initialPage- the page it is displayed before this task starts
OrWebTaskmade up of (in order) this task and the given alternative task. This method can be "recursively" chained in order to define a multi-member OR, e.g.:
new MyTask() .or(new AlternativeTask1()) .or(new AlternativeTask2()) .or(new AlternativeTask3()) ;
alternativeTask- the task to run if this task fails
OrWebTaskmade up of (in order) this task and the alternative
user- the user this task will run as.
Copyright © 2015. All rights reserved.