public class UiObject extends Object implements UserinterfaceObject, MobileElement
UiObject implements UserinterfaceObject and forms the base class of all Android UI automation
elements.| Modifier and Type | Field and Description |
|---|---|
protected SeLionAndroidBridgeDriver |
driver |
protected String |
locator |
| Modifier and Type | Method and Description |
|---|---|
void |
clearText()
Clears the existing text contents in an editable field.
|
void |
click(Object... expected)
Performs a click at the center of the visible bounds of the UI element represented by this UiObject.
|
void |
clickBottomRight(Object... expected)
Clicks the bottom and right corner of the UI element.
|
void |
clickTopLeft(Object... expected)
Clicks the top and left corner of the UI element.
|
org.openqa.selenium.WebElement |
findElement(String locator)
Finds the corresponding web element using the string locator.
|
protected SeLionAndroidBridgeDriver |
getBridgeDriver() |
String |
getLocator()
Returns the locator.
|
String |
getText()
Reads the text property of the UI element.
|
String |
getValue()
Returns a string containing a value attribute specific to the type of element.
|
boolean |
isCheckable()
Checks if the UI element's checkable property is currently true.
|
boolean |
isChecked()
Checks if the UI element's checked property is currently true.
|
boolean |
isClickable()
Checks if the UI element's clickable property is currently true.
|
boolean |
isEnabled()
Checks if the UI element's enabled property is currently true.
|
boolean |
isFocusable()
Checks if the UI element's focusable property is currently true.
|
boolean |
isFocused()
Checks if the UI element's focused property is currently true.
|
boolean |
isLongClickable()
Checks if the view's long-clickable property is currently true.
|
boolean |
isScrollable()
Checks if the view's scrollable property is currently true.
|
boolean |
isSelected()
Checks if the UI element's selected property is currently true.
|
void |
longClick(Object... expected)
Long clicks the center of the visible bounds of the UI element.
|
void |
longClickBottomRight(Object... expected)
Long clicks bottom and right corner of the UI element.
|
void |
longClickTopLeft(Object... expected)
Long clicks on the top and left corner of the UI element.
|
void |
setText(String text)
Sets the text in an editable field, after clearing the field's content.
|
void |
swipeDown(Object... expected)
Performs the swipe down action on the UiObject.
|
void |
swipeLeft(Object... expected)
Performs the swipe left action on the UiObject.
|
void |
swipeRight(Object... expected)
Performs the swipe right action on the UiObject.
|
void |
swipeUp(Object... expected)
Performs the swipe up action on the UiObject.
|
void |
tap(Object... expected)
Taps the specified element and optionally waits for the provided expected elements.
|
protected void |
waitFor(Object... expected) |
protected String locator
protected SeLionAndroidBridgeDriver driver
public UiObject(String locator)
public void clearText()
UserinterfaceObjectclearText in interface UserinterfaceObjectpublic void click(Object... expected)
UserinterfaceObjectclick in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void clickBottomRight(Object... expected)
UserinterfaceObjectclickBottomRight in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void clickTopLeft(Object... expected)
UserinterfaceObjectclickTopLeft in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic String getText()
UserinterfaceObjectgetText in interface UserinterfaceObjectpublic boolean isCheckable()
UserinterfaceObjectisCheckable in interface UserinterfaceObjectpublic boolean isChecked()
UserinterfaceObjectisChecked in interface UserinterfaceObjectpublic boolean isClickable()
UserinterfaceObjectisClickable in interface UserinterfaceObjectpublic boolean isEnabled()
UserinterfaceObjectisEnabled in interface UserinterfaceObjectpublic boolean isFocusable()
UserinterfaceObjectisFocusable in interface UserinterfaceObjectpublic boolean isFocused()
UserinterfaceObjectisFocused in interface UserinterfaceObjectpublic boolean isLongClickable()
UserinterfaceObjectisLongClickable in interface UserinterfaceObjectpublic boolean isScrollable()
UserinterfaceObjectisScrollable in interface UserinterfaceObjectpublic boolean isSelected()
UserinterfaceObjectisSelected in interface UserinterfaceObjectpublic void longClick(Object... expected)
UserinterfaceObjectlongClick in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void longClickBottomRight(Object... expected)
UserinterfaceObjectlongClickBottomRight in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void longClickTopLeft(Object... expected)
UserinterfaceObjectlongClickTopLeft in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void setText(String text)
UserinterfaceObjectsetText in interface UserinterfaceObjecttext - String to set.public void swipeLeft(Object... expected)
UserinterfaceObjectswipeLeft in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void swipeRight(Object... expected)
UserinterfaceObjectswipeRight in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void swipeUp(Object... expected)
UserinterfaceObjectswipeUp in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic void swipeDown(Object... expected)
UserinterfaceObjectswipeDown in interface UserinterfaceObjectexpected - Expected entities in the form of objects extending UiObject, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic org.openqa.selenium.WebElement findElement(String locator)
MobileElementBy
entity and fed to RemoteWebElement.findElement(By) for further processing.findElement in interface MobileElementlocator - A String that represents the means to locate this element (could be id/name/xpath/css locator).WebElement found by the locator.public void tap(Object... expected)
MobileElementtap in interface MobileElementexpected - Expected entities in the form of objects extending UIAElement, xpath location in the form of
String, instances of ExpectedCondition, or an instance of a WebPagepublic String getValue()
MobileElementgetValue in interface MobileElementpublic String getLocator()
getLocator in interface MobileElementUiObjectprotected void waitFor(Object... expected)
protected SeLionAndroidBridgeDriver getBridgeDriver()
Copyright © 2016 PayPal Open Source. All rights reserved.