@Deprecated public class UiCollection extends UiObject
FINGER_TOUCH_HALF_WIDTH, SWIPE_MARGIN_LIMIT, WAIT_FOR_EVENT_TMEOUT, WAIT_FOR_SELECTOR_POLL, WAIT_FOR_SELECTOR_TIMEOUT, WAIT_FOR_WINDOW_TMEOUT
Constructor and Description |
---|
UiCollection(UiSelector selector)
Deprecated.
Constructs an instance as described by the selector
|
Modifier and Type | Method and Description |
---|---|
UiObject |
getChildByDescription(UiSelector childPattern,
String text)
Deprecated.
Searches for child UI element within the constraints of this UiCollection
UiSelector
selector. |
UiObject |
getChildByInstance(UiSelector childPattern,
int instance)
Deprecated.
Searches for child UI element within the constraints of this UiCollection
UiSelector
selector. |
UiObject |
getChildByText(UiSelector childPattern,
String text)
Deprecated.
Searches for child UI element within the constraints of this UiCollection
UiSelector
selector. |
int |
getChildCount(UiSelector childPattern)
Deprecated.
Counts child UI element instances matching the
childPattern
argument. |
clearTextField, click, clickAndWaitForNewWindow, clickAndWaitForNewWindow, clickBottomRight, clickTopLeft, dragTo, dragTo, exists, findAccessibilityNodeInfo, getBounds, getChild, getChildCount, getClassName, getContentDescription, getFromParent, getPackageName, getSelector, getText, getVisibleBounds, isCheckable, isChecked, isClickable, isEnabled, isFocusable, isFocused, isLongClickable, isScrollable, isSelected, longClick, longClickBottomRight, longClickTopLeft, performMultiPointerGesture, performTwoPointerGesture, pinchIn, pinchOut, setText, swipeDown, swipeLeft, swipeRight, swipeUp, waitForExists, waitUntilGone
public UiCollection(UiSelector selector)
selector
- public UiObject getChildByDescription(UiSelector childPattern, String text) throws UiObjectNotFoundException
UiSelector
selector.
It looks for any child matching the childPattern
argument that has
a child UI element anywhere within its sub hierarchy that has content-description text.
The returned UiObject will point at the childPattern
instance that matched the
search and not at the identifying child element that matched the content description.childPattern
- UiSelector
selector of the child pattern to match and returntext
- String of the identifying child contents of of the childPattern
UiObject
pointing at and instance of childPattern
UiObjectNotFoundException
public UiObject getChildByInstance(UiSelector childPattern, int instance) throws UiObjectNotFoundException
UiSelector
selector.
It looks for any child matching the childPattern
argument that has
a child UI element anywhere within its sub hierarchy that is at the instance
specified. The operation is performed only on the visible items and no scrolling is performed
in this case.childPattern
- UiSelector
selector of the child pattern to match and returninstance
- int the desired matched instance of this childPattern
UiObject
pointing at and instance of childPattern
UiObjectNotFoundException
public UiObject getChildByText(UiSelector childPattern, String text) throws UiObjectNotFoundException
UiSelector
selector.
It looks for any child matching the childPattern
argument that has
a child UI element anywhere within its sub hierarchy that has text attribute =
text
. The returned UiObject will point at the childPattern
instance that matched the search and not at the identifying child element that matched the
text attribute.childPattern
- UiSelector
selector of the child pattern to match and returntext
- String of the identifying child contents of of the childPattern
UiObject
pointing at and instance of childPattern
UiObjectNotFoundException
public int getChildCount(UiSelector childPattern)
childPattern
argument. The method returns the number of matching UI elements that are
currently visible. The count does not include items of a scrollable list
that are off-screen.childPattern
- a UiSelector
that represents the matching child UI
elements to countUiCollection