public class TouchActions extends Actions
Modifier and Type | Field and Description |
---|---|
protected TouchScreen |
touchScreen |
Constructor and Description |
---|
TouchActions(Keyboard keyboard,
TouchScreen touchScreen)
Deprecated.
|
TouchActions(WebDriver driver) |
Modifier and Type | Method and Description |
---|---|
TouchActions |
doubleTap(WebElement onElement)
Allows the execution of double tapon the screen, analogous to double click using a Mouse.
|
TouchActions |
down(int x,
int y)
Allows the execution of the gesture 'down' on the screen.
|
TouchActions |
flick(int xSpeed,
int ySpeed)
Sends a flick gesture to the current view.
|
TouchActions |
flick(WebElement onElement,
int xOffset,
int yOffset,
int speed)
Allows the execution of flick gestures starting in a location's element.
|
TouchActions |
longPress(WebElement onElement)
Allows the execution of long press gestures.
|
TouchActions |
move(int x,
int y)
Allows the execution of the gesture 'move' on the screen.
|
TouchActions |
scroll(int xOffset,
int yOffset)
Allows the view to be scrolled by an x and y offset.
|
TouchActions |
scroll(WebElement onElement,
int xOffset,
int yOffset)
Creates a scroll gesture that starts on a particular screen location.
|
TouchActions |
singleTap(WebElement onElement)
Allows the execution of single tap on the screen, analogous to click using a Mouse.
|
TouchActions |
up(int x,
int y)
Allows the execution of the gesture 'up' on the screen.
|
build, click, click, clickAndHold, clickAndHold, contextClick, contextClick, doubleClick, doubleClick, dragAndDrop, dragAndDropBy, keyDown, keyDown, keyUp, keyUp, moveByOffset, moveToElement, moveToElement, pause, pause, perform, release, release, sendKeys, sendKeys, tick, tick
protected TouchScreen touchScreen
public TouchActions(WebDriver driver)
@Deprecated public TouchActions(Keyboard keyboard, TouchScreen touchScreen)
public TouchActions singleTap(WebElement onElement)
onElement
- the WebElement
on the screen.public TouchActions down(int x, int y)
x
- The x coordinate relative to the viewporty
- The y coordinate relative to the viewportpublic TouchActions up(int x, int y)
x
- The x coordinate relative to the viewporty
- The y coordinate relative to the viewportpublic TouchActions move(int x, int y)
x
- The x coordinate relative to the viewporty
- The y coordinate relative to the viewportpublic TouchActions scroll(WebElement onElement, int xOffset, int yOffset)
onElement
- the WebElement
where the scroll starts.xOffset
- The x offset to scrollyOffset
- The y offset to scrollpublic TouchActions doubleTap(WebElement onElement)
onElement
- The WebElement
to double tappublic TouchActions longPress(WebElement onElement)
onElement
- The WebElement
to long presspublic TouchActions scroll(int xOffset, int yOffset)
xOffset
- The horizontal offset relative to the viewportyOffset
- The vertical offset relative to the viewportpublic TouchActions flick(int xSpeed, int ySpeed)
xSpeed
- The horizontal speed in pixels/secondySpeed
- The vertical speed in pixels/secondpublic TouchActions flick(WebElement onElement, int xOffset, int yOffset, int speed)
onElement
- The WebElement
to flick onxOffset
- The x offset relative to the viewportyOffset
- The y offset relative to the viewportspeed
- speed to flick, 0 = normal, 1 = fast, 2 = slow