UiCollection
class UiCollection : UiObject
UiScrollable |
UiScrollable is a |
Used to enumerate a container's UI elements for the purpose of counting, or targeting a sub elements by a child's text or description.
Summary
Public constructors |
|---|
UiCollection(selector: UiSelector)Constructs an instance as described by the selector |
Public functions |
|
|---|---|
UiObject |
getChildByDescription(childPattern: UiSelector, text: String)Searches for child UI element within the constraints of this UiCollection |
UiObject |
getChildByInstance(childPattern: UiSelector, instance: Int)Searches for child UI element within the constraints of this UiCollection |
UiObject |
getChildByText(childPattern: UiSelector, text: String)Searches for child UI element within the constraints of this UiCollection |
Int |
getChildCount(childPattern: UiSelector)Counts child UI element instances matching the |
Inherited Constants |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited functions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
UiCollection
UiCollection(selector: UiSelector)
Constructs an instance as described by the selector
| Parameters | |
|---|---|
selector: UiSelector |
Public functions
getChildByDescription
fun getChildByDescription(childPattern: UiSelector, text: String): UiObject
Searches for child UI element within the constraints of this UiCollection 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.
| Parameters | |
|---|---|
childPattern: UiSelector |
|
text: String |
String of the identifying child contents of of the |
getChildByInstance
fun getChildByInstance(childPattern: UiSelector, instance: Int): UiObject
Searches for child UI element within the constraints of this UiCollection 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.
| Parameters | |
|---|---|
childPattern: UiSelector |
|
instance: Int |
int the desired matched instance of this |
getChildByText
fun getChildByText(childPattern: UiSelector, text: String): UiObject
Searches for child UI element within the constraints of this UiCollection 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.
| Parameters | |
|---|---|
childPattern: UiSelector |
|
text: String |
String of the identifying child contents of of the |
getChildCount
fun getChildCount(childPattern: UiSelector): Int
Counts child UI element instances matching the 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.
| Parameters | |
|---|---|
childPattern: UiSelector |
a |
| Returns | |
|---|---|
Int |
the number of matched childPattern under the current |