public abstract class MobileElement extends org.openqa.selenium.remote.RemoteWebElement implements FindsByAccessibilityId, TouchableElement
| Modifier and Type | Field and Description |
|---|---|
protected org.openqa.selenium.remote.FileDetector |
fileDetector |
| Constructor and Description |
|---|
MobileElement() |
| Modifier and Type | Method and Description |
|---|---|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementByAccessibilityId(String using) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElementsByAccessibilityId(String using) |
org.openqa.selenium.Point |
getCenter() |
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.
|
clear, click, equals, execute, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getAttribute, getCoordinates, getCssValue, getId, getLocation, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, submit, toStringpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebElementfindElements in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebElementfindElement in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.WebElement findElementByAccessibilityId(String using)
findElementByAccessibilityId in interface FindsByAccessibilityIdpublic List<org.openqa.selenium.WebElement> findElementsByAccessibilityId(String using)
findElementsByAccessibilityId in interface FindsByAccessibilityIdpublic org.openqa.selenium.Point getCenter()
public void pinch()
TouchableElementpinch in interface TouchableElementpublic void tap(int fingers,
int duration)
TouchableElementtap in interface TouchableElementfingers - number of fingers/appendages to tap withduration - how long between pressing down, and lifting fingers/appendagespublic void zoom()
TouchableElementzoom in interface TouchableElementpublic void swipe(SwipeElementDirection direction, int duration)
TouchableElementswipe in interface TouchableElementdirection - UP, DOWN, LEFT, RIGHTduration - amount of time in milliseconds for the entire swipe action to
takepublic void swipe(SwipeElementDirection direction, int offsetFromStartBorder, int offsetFromEndBorder, int duration) throws IllegalCoordinatesException
TouchableElementswipe in interface TouchableElementdirection - 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.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 © 2015. All rights reserved.