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(java.lang.String command)
Executes JSONWP command and returns a response.
|
org.openqa.selenium.remote.Response |
execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
Executes JSONWP command and returns a response.
|
T |
findElement(org.openqa.selenium.By by)
Find the first
WebElement using the given method. |
T |
findElement(java.lang.String by,
java.lang.String using)
Method performs the searching for a single element by some selector defined by string
and value of the given selector.
|
T |
findElementByClassName(java.lang.String using) |
T |
findElementByCssSelector(java.lang.String using)
Finds a single element by CSS selector.
|
T |
findElementById(java.lang.String id) |
T |
findElementByLinkText(java.lang.String using)
Finds a single element by link text.
|
T |
findElementByName(java.lang.String using) |
T |
findElementByPartialLinkText(java.lang.String using)
Finds a single element by partial link text.
|
T |
findElementByTagName(java.lang.String using) |
T |
findElementByXPath(java.lang.String using) |
java.util.List<MobileElement> |
findElements(org.openqa.selenium.By by)
Find all elements within the current context using the given mechanism.
|
java.util.List<MobileElement> |
findElements(java.lang.String by,
java.lang.String using)
Method performs the searching for a list of elements by some selector defined by string
and value of the given selector.
|
java.util.List<MobileElement> |
findElementsByAccessibilityId(java.lang.String using)
Method performs the searching for a list of elements by accessibility ID selector
and value of the given selector.
|
java.util.List<MobileElement> |
findElementsByClassName(java.lang.String using) |
java.util.List<MobileElement> |
findElementsByCssSelector(java.lang.String using)
Finds many elements by CSS selector.
|
java.util.List<MobileElement> |
findElementsById(java.lang.String id) |
java.util.List<MobileElement> |
findElementsByLinkText(java.lang.String using)
Finds many elements by link text.
|
java.util.List<MobileElement> |
findElementsByName(java.lang.String using) |
java.util.List<MobileElement> |
findElementsByPartialLinkText(java.lang.String using)
Finds many elements by partial link text.
|
java.util.List<MobileElement> |
findElementsByTagName(java.lang.String using) |
java.util.List<MobileElement> |
findElementsByXPath(java.lang.String using) |
org.openqa.selenium.Point |
getCenter()
Method returns central coordinates of an element.
|
java.lang.String |
getCssValue(java.lang.String propertyName)
Get the value of a given CSS property.
|
void |
setValue(java.lang.String value)
This method sets the new value of the attribute "value".
|
void |
submit()
If this current element is a form, or an element within a form, then this will be submitted to
the remote server.
|
clear, click, equals, getAttribute, getCoordinates, getId, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, toJson, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindElementByAccessibilityIdpublic org.openqa.selenium.Point getCenter()
Pointpublic java.util.List<MobileElement> findElements(org.openqa.selenium.By by)
WebElementfindElements in interface SearchContextfindElements in interface WebElementby - The locating mechanism to useWebElements, or an empty list if nothing matches.By,
WebDriver.Timeoutspublic java.util.List<MobileElement> findElements(java.lang.String by, java.lang.String using)
FindsByFluentSelectorfindElements in interface FindsByFluentSelector<MobileElement>by - is a string selectorusing - is a value of the given selectorpublic java.util.List<MobileElement> findElementsById(java.lang.String id)
findElementsById in interface FindsByIdpublic java.util.List<MobileElement> findElementsByLinkText(java.lang.String using)
findElementsByLinkText in interface FindsByLinkTextpublic java.util.List<MobileElement> findElementsByPartialLinkText(java.lang.String using)
findElementsByPartialLinkText in interface FindsByLinkTextpublic java.util.List<MobileElement> findElementsByTagName(java.lang.String using)
findElementsByTagName in interface FindsByTagNamepublic java.util.List<MobileElement> findElementsByName(java.lang.String using)
findElementsByName in interface FindsByNamepublic java.util.List<MobileElement> findElementsByClassName(java.lang.String using)
findElementsByClassName in interface FindsByClassNamepublic java.util.List<MobileElement> findElementsByCssSelector(java.lang.String using)
findElementsByCssSelector in interface FindsByCssSelectorpublic java.util.List<MobileElement> findElementsByXPath(java.lang.String using)
findElementsByXPath in interface FindsByXPathpublic java.util.List<MobileElement> findElementsByAccessibilityId(java.lang.String using)
FindsByAccessibilityIdusing - an accessibility ID selectorpublic void setValue(java.lang.String value)
value - is the new value which should be setpublic org.openqa.selenium.remote.Response execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
ExecutesMethodexecute in interface ExecutesMethodexecute in class org.openqa.selenium.remote.RemoteWebElementdriverCommand - a JSONWP commandparameters - map of command parameterspublic org.openqa.selenium.remote.Response execute(java.lang.String command)
ExecutesMethodexecute in interface ExecutesMethodcommand - a JSONWP commandpublic T findElement(org.openqa.selenium.By by)
WebElementWebElement using the given method. See the note in
WebElement.findElements(By) about finding via XPath.
This method is affected by the 'implicit wait' times in force at the time of execution.
The findElement(..) invocation will return a matching row, or try again repeatedly until
the configured timeout is reached.
findElement should not be used to look for non-present elements, use WebElement.findElements(By)
and assert zero length response instead.findElement in interface SearchContextfindElement in interface WebElementfindElement in class org.openqa.selenium.remote.RemoteWebElementby - The locating mechanismBy,
WebDriver.Timeoutspublic T findElement(java.lang.String by,
java.lang.String using)
FindsByFluentSelectorfindElement in interface FindsByFluentSelector<T extends WebElement>findElement in class org.openqa.selenium.remote.RemoteWebElementby - is a string selectorusing - is a value of the given selectorpublic T findElementById(java.lang.String id)
findElementById in interface FindsByIdfindElementById in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByLinkText(java.lang.String using)
throws org.openqa.selenium.WebDriverException
findElementByLinkText in interface FindsByLinkTextfindElementByLinkText in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - This method doesn't work against native app UI.public T findElementByPartialLinkText(java.lang.String using)
throws org.openqa.selenium.WebDriverException
findElementByPartialLinkText in interface FindsByLinkTextfindElementByPartialLinkText in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - This method doesn't work against native app UI.public T findElementByTagName(java.lang.String using)
findElementByTagName in interface FindsByTagNamefindElementByTagName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByName(java.lang.String using)
findElementByName in interface FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByClassName(java.lang.String using)
findElementByClassName in interface FindsByClassNamefindElementByClassName in class org.openqa.selenium.remote.RemoteWebElementpublic T findElementByCssSelector(java.lang.String using)
throws org.openqa.selenium.WebDriverException
findElementByCssSelector in interface FindsByCssSelectorfindElementByCssSelector in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - This method doesn't work against native app UI.public T findElementByXPath(java.lang.String using)
findElementByXPath in interface FindsByXPathfindElementByXPath in class org.openqa.selenium.remote.RemoteWebElementpublic void submit()
throws org.openqa.selenium.WebDriverException
submit in interface WebElementsubmit in class org.openqa.selenium.remote.RemoteWebElementorg.openqa.selenium.WebDriverException - because it may not work against native app UI.public java.lang.String getCssValue(java.lang.String propertyName)
throws org.openqa.selenium.WebDriverException
getCssValue in interface WebElementgetCssValue in class org.openqa.selenium.remote.RemoteWebElementpropertyName - the css property name of the elementorg.openqa.selenium.WebDriverException - because it may not work against native app UI.