-
- All Implemented Interfaces:
public class DetoxAction
Created by simonracz on 10/07/2017.
-
-
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
setDatePickerDate(String dateString, String formatString)
static ViewAction
adjustSliderToPosition(double newPosition)
static ViewAction
takeViewScreenshot()
-
-
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)
-
setDatePickerDate
static ViewAction setDatePickerDate(String dateString, String formatString)
-
adjustSliderToPosition
static ViewAction adjustSliderToPosition(double newPosition)
-
takeViewScreenshot
static ViewAction takeViewScreenshot()
-
-
-
-