public final class ViewInteraction
extends java.lang.Object
Each interaction is associated with a view identified by a view matcher. All view actions and asserts are performed on the UI thread (thus ensuring sequential execution). The same goes for retrieval of views (this is done to ensure that view state is "fresh" prior to execution of each operation).
Modifier and Type | Method and Description |
---|---|
ViewInteraction |
check(ViewAssertion viewAssert)
Checks the given
ViewAssertion on the the view selected by the current view matcher. |
ViewInteraction |
inRoot(
Makes this ViewInteraction scoped to the root selected by the given root matcher.
|
ViewInteraction |
perform(ViewAction... viewActions)
Performs the given action(s) on the view selected by the current view matcher.
|
public ViewInteraction perform(ViewAction... viewActions)
viewActions
- one or more actions to execute.public ViewInteraction inRoot(rootMatcher)
public ViewInteraction check(ViewAssertion viewAssert)
ViewAssertion
on the the view selected by the current view matcher.viewAssert
- the assertion to perform.