Package 

Interface AutoScrollProvider

    • Method Summary

      Modifier and Type Method Description
      abstract <T extends Any> T withAutoScroll(Interaction interaction, Function0<T> action) Invokes the given action and calls scroll if it fails.
      abstract <T extends Any> T scroll(Interaction interaction, Function0<T> action, Throwable cachedError) Performs the autoscrolling functionality.
      • Methods inherited from class com.kaspersky.kaspresso.autoscroll.AutoScrollProvider

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withAutoScroll

         abstract <T extends Any> T withAutoScroll(Interaction interaction, Function0<T> action)

        Invokes the given action and calls scroll if it fails. Helps in cases when test fails because of the need to scroll to interacted view.

        Parameters:
        interaction - the interaction interface to perform actions and assertions.
        action - the actual action on the interacted view.
      • scroll

         abstract <T extends Any> T scroll(Interaction interaction, Function0<T> action, Throwable cachedError)

        Performs the autoscrolling functionality. Performs scroll and re-invokes the given action.

        Parameters:
        interaction - the interaction interface to perform actions and assertions.
        action - the actual action on the interacted view.
        cachedError - the error to be thrown if autoscroll would not help.