public class TouchActionBuilder extends Object
| Constructor and Description |
|---|
TouchActionBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(String actionName) |
TouchAction |
build() |
TouchActionBuilder |
flick(org.openqa.selenium.Point origin,
FlickDirection direction,
int distance,
int duration)
Non-standard (high-level) command to flick the screen in a given tick.
|
TouchActionBuilder |
pause()
Pause can be used to synchronize actions in a MultiTouchAction chain, pause() is equivalent
to a no-op for a tick.
|
TouchActionBuilder |
pause(int ms)
Pause for a given period of time (in milliseconds).
|
TouchActionBuilder |
pointerCancel()
Cancels the existing sequence of actions.
|
TouchActionBuilder |
pointerDown(int x,
int y)
Places Pointer down at the specified (x, y) coordinates.
|
TouchActionBuilder |
pointerDown(org.openqa.selenium.WebElement element)
Places the pointer down at the top left corner of the specified WebElement.
|
TouchActionBuilder |
pointerDown(org.openqa.selenium.WebElement element,
int x,
int y)
Places pointer down at an offset from the top left corner of the specified WebElement
|
TouchActionBuilder |
pointerMove(int x,
int y)
Places Moves the pointer to the specified (x, y) coordinates.
|
TouchActionBuilder |
pointerMove(org.openqa.selenium.WebElement element)
Moves the pointer to the top left corner of the specified WebElement.
|
TouchActionBuilder |
pointerMove(org.openqa.selenium.WebElement element,
int x,
int y)
Moves the pointer to a position offset from the top left corner of the specified WebElement
This is only possible if the pointer is currently down.
|
TouchActionBuilder |
pointerUp()
Removes pointer from the touch screen at it's current position.
|
public void addAction(String actionName)
public TouchActionBuilder pointerDown(org.openqa.selenium.WebElement element)
element - WebElement to place pointer down onpublic TouchActionBuilder pointerDown(int x, int y)
x - x-coordinatey - y-coordinatepublic TouchActionBuilder pointerDown(org.openqa.selenium.WebElement element, int x, int y)
element - WebElement to place pointer relative tox - x-offset from top lefty - y-offset from top leftpublic TouchActionBuilder pointerUp()
public TouchActionBuilder pointerMove(org.openqa.selenium.WebElement element)
element - WebElement to place pointer down onpublic TouchActionBuilder pointerMove(int x, int y)
x - x-coordinatey - y-coordinatepublic TouchActionBuilder pointerMove(org.openqa.selenium.WebElement element, int x, int y)
element - WebElement to place pointer relative tox - x-offset from top lefty - y-offset from top leftpublic TouchActionBuilder pause()
public TouchActionBuilder pause(int ms)
ms - Pause Time (in ms)public TouchActionBuilder flick(org.openqa.selenium.Point origin, FlickDirection direction, int distance, int duration)
origin - Point at which the flick should startdirection - Direction in which to flickdistance - Distance in which the flick should occurduration - Length of time the finger should be down on the screenpublic TouchActionBuilder pointerCancel()
public TouchAction build()
Copyright © 2015. All rights reserved.