|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.selenium.interactions.Actions
org.openqa.selenium.interactions.touch.TouchActions
public class TouchActions
Implements actions for touch enabled devices, reusing the available composite and builder design patterns from Actions.
| Field Summary | |
|---|---|
protected TouchScreen |
touchScreen
|
| Fields inherited from class org.openqa.selenium.interactions.Actions |
|---|
action, keyboard, mouse |
| Constructor Summary | |
|---|---|
TouchActions(Keyboard keyboard,
TouchScreen touchScreen)
|
|
TouchActions(WebDriver driver)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.openqa.selenium.interactions.Actions |
|---|
build, click, click, clickAndHold, clickAndHold, contextClick, contextClick, doubleClick, doubleClick, dragAndDrop, dragAndDropBy, keyDown, keyDown, keyUp, keyUp, moveByOffset, moveToElement, moveToElement, perform, release, release, sendKeys, sendKeys |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TouchScreen touchScreen
| Constructor Detail |
|---|
public TouchActions(WebDriver driver)
public TouchActions(Keyboard keyboard,
TouchScreen touchScreen)
| Method Detail |
|---|
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 viewport
public TouchActions up(int x,
int y)
x - The x coordinate relative to the viewporty - The y coordinate relative to the viewport
public TouchActions move(int x,
int y)
x - The x coordinate relative to the viewporty - The y coordinate relative to the viewport
public 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 press
public TouchActions scroll(int xOffset,
int yOffset)
xOffset - The horizontal offset relative to the viewportyOffset - The vertical offset relative to the viewport
public TouchActions flick(int xSpeed,
int ySpeed)
xSpeed - The horizontal speed in pixels/secondySpeed - The vertical speed in pixels/second
public 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 viewport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||