-
- All Implemented Interfaces:
public class DetoxActionCreated by simonracz on 10/07/2017.
-
-
Method Summary
Modifier and Type Method Description static ViewActionmultiClick(int times)static ViewActiontapAtLocation(int x, int y)static ViewActionscrollToEdge(int edge)Scrolls to the edge of the given scrollable view. static ViewActionscrollInDirection(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)Scrolls the View in a direction by the Density Independent Pixel amount. static ViewActionscrollInDirectionStaleAtEdge(int direction, double amountInDP, double startOffsetPercentX, double startOffsetPercentY)Scroll the view in a direction by a specified amount (DP units). static ViewActionswipeInDirection(int direction, boolean fast, double normalizedOffset, double normalizedStartingPointX, double normalizedStartingPointY)Swipes the View in a direction. static ViewActiongetAttributes()static ViewActionscrollToIndex(int index)static ViewActionadjustSliderToPosition(double newPosition)static ViewActiontakeViewScreenshot()-
-
Method Detail
-
multiClick
static ViewAction multiClick(int times)
-
tapAtLocation
static ViewAction tapAtLocation(int x, int y)
-
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 PixelsstartOffsetPercentX- 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 PixelsstartOffsetPercentX- 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 slownormalizedOffset- 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.
-
getAttributes
static ViewAction getAttributes()
-
scrollToIndex
static ViewAction scrollToIndex(int index)
-
adjustSliderToPosition
static ViewAction adjustSliderToPosition(double newPosition)
-
takeViewScreenshot
static ViewAction takeViewScreenshot()
-
-
-
-