public interface TouchableElement
extends org.openqa.selenium.WebElement
WebElement
and describes this behavior.Modifier and Type | Method and Description |
---|---|
void |
pinch()
Convenience method for pinching the given element.
|
void |
swipe(SwipeElementDirection direction,
int duration)
Convenience method for swiping on the given element to the given direction
|
void |
swipe(SwipeElementDirection direction,
int offsetFromStartBorder,
int offsetFromEndBorder,
int duration)
Convenience method for swiping on the given element to the given direction
|
void |
tap(int fingers,
int duration)
Convenience method for tapping the center of the given element
|
void |
zoom()
Convenience method for "zooming in" on the given element.
|
void pinch()
void tap(int fingers, int duration)
fingers
- number of fingers/appendages to tap withduration
- how long between pressing down, and lifting fingers/appendagesvoid zoom()
void swipe(SwipeElementDirection direction, int duration)
direction
- UP, DOWN, LEFT, RIGHTduration
- amount of time in milliseconds for the entire swipe action to
takevoid swipe(SwipeElementDirection direction, int offsetFromStartBorder, int offsetFromEndBorder, int duration) throws IllegalCoordinatesException
direction
- direction UP, DOWN, LEFT, RIGHToffsetFromEndBorder
- is the offset from the border of the element where the swiping should be started.
If direction is UP then
this is offset from the bottom of the element. If direction is DOWN then
this is offset from the top of the element. If direction is RIGHT then
this is offset from the left border of the element. If direction is LEFT then
this is offset from the right border of the element.offsetFromEndBorder
- is the offset from the border of the element where the swiping should be finished.
If direction is UP then
this is offset from the top of the element. If direction is DOWN then
this is offset from the bottom of the element. If direction is RIGHT then
this is offset from the right border of the element. If direction is LEFT then
this is offset from the left border of the element.duration
- amount of time in milliseconds for the entire swipe action to
takeIllegalCoordinatesException
- when resulted coordinates are out of the element borders
or disagree with the given directionCopyright © 2016. All rights reserved.