java.lang.Object | |
↳ | android.support.test.espresso.web.model.SimpleAtom |
A simple implementation of Atom suitable for subclassing.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SimpleAtom.ElementReferencePlacement | Controls whether the ElementReference appears as the first arg or last arg to the script. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a SimpleAtom which runs the given script and places any ElementReference as the first
argument to the script.
| |||||||||||
Creates a SimpleAtom which runs the given script and places any supplied ElementReference
either as the first or last argument to the script.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The SimpleAtom presents an argument list to the script which follows some basic conventions.
| |||||||||||
Returns the script this SimpleAtom was created with.
| |||||||||||
The SimpleAtom's transform method checks the Evaluation object for success.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Extend this method to pass additional arguments to the script.
| |||||||||||
Extend this method to handle a failure code in the Evaluation object.
| |||||||||||
Extend this method to handle the case where getArguments() has been called without
an ElementReference.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.support.test.espresso.web.model.Atom
|
Creates a SimpleAtom which runs the given script and places any ElementReference as the first argument to the script.
Creates a SimpleAtom which runs the given script and places any supplied ElementReference either as the first or last argument to the script.
The SimpleAtom presents an argument list to the script which follows some basic conventions. If an ElementReference is provided, it is placed either in the first or last position based on the ElementReferencePlacement provided to the constructor. The nonContextualArguments (if provided via getNonContextualArguments) will appear after the ElementReference.
elementRef | null unless an ElementReference has been supplied to execute this atom with. |
---|
Returns the script this SimpleAtom was created with.
The SimpleAtom's transform method checks the Evaluation object for success. If the Evaluation object has an error, the default behaviour is to throw an exception, subclasses may change this behaviour via the handleBadEvaluation method.
Extend this method to pass additional arguments to the script.
Extend this method to handle a failure code in the Evaluation object. The default implementation will throw an exception, subclasses may want to ignore certain failure cases.
RuntimeException | if the badness level is too high. |
---|
Extend this method to handle the case where getArguments() has been called without an ElementReference. Implementors may want to throw an exception here if they require an ElementReference to evaluate properly.