Package 

Class DetoxAction

  • All Implemented Interfaces:

    
    public class DetoxAction
    
                        

    Created by simonracz on 10/07/2017.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static ViewAction multiClick(int times)
      static ViewAction tapAtLocation(int x, int y)
      static ViewAction scrollToEdge(int edge) Scrolls to the edge of the given scrollable view.
      static ViewAction scrollInDirection(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY) Scrolls the View in a direction by the Density Independent Pixel amount.
      static ViewAction scrollInDirectionStaleAtEdge(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY) Scroll the view in a direction by a specified amount (DP units).
      static ViewAction swipeInDirection(int direction, boolean fast, double normalizedOffset, double normalizedStartingPointX, double normalizedStartingPointY) Swipes the View in a direction.
      static ViewAction getAttributes()
      static ViewAction scrollToIndex(int index)
      static ViewAction adjustSliderToPosition(double newPosition)
      static ViewAction takeViewScreenshot()
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • multiClick

         static ViewAction multiClick(int times)
      • scrollToEdge

         static ViewAction scrollToEdge(int edge)

        Scrolls to the edge of the given scrollable view.

        Parameters:
        edge - Direction to scroll (see MotionDir)
      • scrollInDirection

         static ViewAction scrollInDirection(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)

        Scrolls the View in a direction by the Density Independent Pixel amount.

        Parameters:
        direction - Direction to scroll (see MotionDir)
        amountInDP - Density Independent Pixels
        startOffsetPercentX - Percentage denoting where X-swipe should start, with respect to the scrollable view.
        startOffsetPercentY - Percentage denoting where Y-swipe should start, with respect to the scrollable view.
      • scrollInDirectionStaleAtEdge

         static ViewAction scrollInDirectionStaleAtEdge(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)

        Scroll the view in a direction by a specified amount (DP units). Similar to scrollInDirection, but stops gracefully in the case where the scrolling-edge is reached, by throwing the StaleActionException exception (i.e. so as to make this use case manageable by the user).

        Parameters:
        direction - Direction to scroll (see MotionDir)
        amountInDP - Density Independent Pixels
        startOffsetPercentX - Percentage denoting where X-swipe should start, with respect to the scrollable view.
        startOffsetPercentY - Percentage denoting where Y-swipe should start, with respect to the scrollable view.
      • swipeInDirection

         static ViewAction swipeInDirection(int direction, boolean fast, double normalizedOffset, double normalizedStartingPointX, double normalizedStartingPointY)

        Swipes the View in a direction.

        Parameters:
        direction - Direction to swipe (see MotionDir)
        fast - true if fast, false if slow
        normalizedOffset - or "swipe amount" between 0.0 and 1.
        normalizedStartingPointX - X coordinate of swipe starting point (between 0.0 and 1.
        normalizedStartingPointY - Y coordinate of swipe starting point (between 0.0 and 1.