Package 

Interface BaseActions


  • 
    public interface BaseActions
    
                        

    Base interface for performing actions on view

    Provides a lot of basic action methods, such as click(), scrollTo(), etc.

    • 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)
      • 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 action
        action - Action to be performed
        matcher - ViewBuilder that will be used as matcher