-
public interface BaseActionsBase interface for performing actions on view
Provides a lot of basic action methods, such as click(), scrollTo(), etc.
-
-
Method Summary
Modifier and Type Method Description Unitclick(CoordinatesProvider location)Performs click on view UnitdoubleClick(CoordinatesProvider location)Performs double click on view UnitlongClick(CoordinatesProvider location)Performs long click on view UnitpressImeAction()Presses IME action, if supported view is in focus UnitscrollTo()Scrolls to the view, if possible Unitact(Function0<ViewAction> function)Performs custom action on a view UnitonFailure(Function2<Throwable, Matcher<View>, Unit> function)Adds failure handler to the view UnitrepeatUntil(Integer maxAttempts, Function0<ViewAction> action, Function1<ViewBuilder, Unit> matcher)Repeats given action on the view until this view will match the given matcher abstract ViewInteractionDelegategetView()-
-
Method Detail
-
click
Unit click(CoordinatesProvider location)
Performs click on view
- Parameters:
location- Location of view where it should be clicked (VISIBLE_CENTER by default)
-
doubleClick
Unit doubleClick(CoordinatesProvider location)
Performs double click on view
- Parameters:
location- Location of view where it should be clicked (VISIBLE_CENTER by default)
-
longClick
Unit longClick(CoordinatesProvider location)
Performs long click on view
- Parameters:
location- Location of view where it should be clicked (VISIBLE_CENTER by default)
-
pressImeAction
Unit pressImeAction()
Presses IME action, if supported view is in focus
-
act
Unit act(Function0<ViewAction> function)
Performs custom action on a view
- Parameters:
function- Lambda that must return ViewAction which will be performed
-
onFailure
Unit onFailure(Function2<Throwable, Matcher<View>, Unit> function)
Adds failure handler to the view
- Parameters:
function- Lambda that handles this view's errors
-
repeatUntil
Unit repeatUntil(Integer maxAttempts, Function0<ViewAction> action, Function1<ViewBuilder, Unit> matcher)
Repeats given action on the view until this view will match the given matcher
- Parameters:
maxAttempts- Maximum repeat count of the actionaction- Action to be performedmatcher- ViewBuilder that will be used as matcher
-
getView
abstract ViewInteractionDelegate getView()
-
-
-
-