public abstract class MobileElement
extends org.openqa.selenium.remote.RemoteWebElement
| 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.remote.Response |
execute(String driverCommand,
Map<String,?> parameters) |
T |
findElement(org.openqa.selenium.By by) |
T |
findElementByAccessibilityId(String using) |
T |
findElementByClassName(String using) |
T |
findElementByCssSelector(String using) |
T |
findElementById(String id) |
T |
findElementByLinkText(String using) |
T |
findElementByName(String using) |
T |
findElementByPartialLinkText(String using) |
T |
findElementByTagName(String using) |
T |
findElementByXPath(String using) |
List<MobileElement> |
findElements(org.openqa.selenium.By by) |
List<MobileElement> |
findElementsByAccessibilityId(String using) |
List<MobileElement> |
findElementsByClassName(String using) |
List<MobileElement> |
findElementsByCssSelector(String using) |
List<MobileElement> |
findElementsById(String id) |
List<MobileElement> |
findElementsByLinkText(String using) |
List<MobileElement> |
findElementsByName(String using) |
List<MobileElement> |
findElementsByPartialLinkText(String using) |
List<MobileElement> |
findElementsByTagName(String using) |
List<MobileElement> |
findElementsByXPath(String using) |
org.openqa.selenium.Point |
getCenter() |
String |
getCssValue(String propertyName) |
void |
pinch()
Convenience method for pinching the given element.
|
void |
submit() |
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, findElement, findElements, getAttribute, getCoordinates, getId, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic org.openqa.selenium.Point getCenter()
public void pinch()
TouchableElementpublic void tap(int fingers,
int duration)
TouchableElementfingers - number of fingers/appendages to tap withduration - how long between pressing down, and lifting fingers/appendagespublic void zoom()
TouchableElementpublic void swipe(SwipeElementDirection direction, int duration)
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
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 directionpublic List<MobileElement> findElements(org.openqa.selenium.By by)
findElements in interface GenericSearchContext<MobileElement>findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebElementpublic List<MobileElement> findElementsById(String id)
findElementsById in interface GenericFindsById<MobileElement>findElementsById in interface org.openqa.selenium.internal.FindsByIdpublic List<MobileElement> findElementsByLinkText(String using)
findElementsByLinkText in interface GenericFindsByLinkText<MobileElement>findElementsByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic List<MobileElement> findElementsByPartialLinkText(String using)
findElementsByPartialLinkText in interface GenericFindsByLinkText<MobileElement>findElementsByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic List<MobileElement> findElementsByTagName(String using)
findElementsByTagName in interface GenericFindsByTagName<MobileElement>findElementsByTagName in interface org.openqa.selenium.internal.FindsByTagNamepublic List<MobileElement> findElementsByName(String using)
findElementsByName in interface GenericFindsByName<MobileElement>findElementsByName in interface org.openqa.selenium.internal.FindsByNamepublic List<MobileElement> findElementsByClassName(String using)
findElementsByClassName in interface GenericFindsByClassName<MobileElement>findElementsByClassName in interface org.openqa.selenium.internal.FindsByClassNamepublic List<MobileElement> findElementsByCssSelector(String using)
findElementsByCssSelector in interface GenericFindsByCssSelector<MobileElement>findElementsByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorpublic List<MobileElement> findElementsByXPath(String using)
findElementsByXPath in interface GenericFindsByXPath<MobileElement>findElementsByXPath in interface org.openqa.selenium.internal.FindsByXPathpublic List<MobileElement> findElementsByAccessibilityId(String using)
findElementsByAccessibilityId in interface FindsByAccessibilityId<MobileElement>public org.openqa.selenium.remote.Response execute(String driverCommand, Map<String,?> parameters)
execute in class org.openqa.selenium.remote.RemoteWebElementpublic T findElement(org.openqa.selenium.By by)
findElement in interface GenericSearchContext<T extends org.openqa.selenium.WebElement>findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebElementfindElement in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementById(String id)
findElementById in interface GenericFindsById<T extends org.openqa.selenium.WebElement>findElementById in interface org.openqa.selenium.internal.FindsByIdfindElementById in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByLinkText(String using) throws org.openqa.selenium.WebDriverException
findElementByLinkText in interface GenericFindsByLinkText<T extends org.openqa.selenium.WebElement>findElementByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementByLinkText in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - his method doesn't work against native app UI.public T findElementByPartialLinkText(String using) throws org.openqa.selenium.WebDriverException
findElementByPartialLinkText in interface GenericFindsByLinkText<T extends org.openqa.selenium.WebElement>findElementByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementByPartialLinkText in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - his method doesn't work against native app UI.public T findElementByTagName(String using)
findElementByTagName in interface GenericFindsByTagName<T extends org.openqa.selenium.WebElement>findElementByTagName in interface org.openqa.selenium.internal.FindsByTagNamefindElementByTagName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByName(String using)
findElementByName in interface GenericFindsByName<T extends org.openqa.selenium.WebElement>findElementByName in interface org.openqa.selenium.internal.FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByClassName(String using)
findElementByClassName in interface GenericFindsByClassName<T extends org.openqa.selenium.WebElement>findElementByClassName in interface org.openqa.selenium.internal.FindsByClassNamefindElementByClassName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByCssSelector(String using) throws org.openqa.selenium.WebDriverException
findElementByCssSelector in interface GenericFindsByCssSelector<T extends org.openqa.selenium.WebElement>findElementByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorfindElementByCssSelector in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - his method doesn't work against native app UI.public T findElementByXPath(String using)
findElementByXPath in interface GenericFindsByXPath<T extends org.openqa.selenium.WebElement>findElementByXPath in interface org.openqa.selenium.internal.FindsByXPathfindElementByXPath in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByAccessibilityId(String using)
findElementByAccessibilityId in interface FindsByAccessibilityId<T extends org.openqa.selenium.WebElement>public void submit()
throws org.openqa.selenium.WebDriverException
submit in interface org.openqa.selenium.WebElementsubmit in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - because it may not work against native app UI.public String getCssValue(String propertyName) throws org.openqa.selenium.WebDriverException
getCssValue in interface org.openqa.selenium.WebElementgetCssValue in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - because it may not work against native app UI.Copyright © 2016. All rights reserved.