# UiCollection

# UiCollection

Artifact:[androidx.test.uiautomator:uiautomator](https://developer.android.com/jetpack/androidx/releases/test-uiautomator)  
[View Source](https://cs.android.com/search?q=file:androidx/test/uiautomator/UiCollection.java+class:androidx.test.uiautomator.UiCollection)  
Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/uiautomator/UiCollection "View this page in Java")

<br />

```
class UiCollection : UiObject
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                    |||
| ↳ | [androidx.test.uiautomator.UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)            ||
|   | ↳ | [androidx.test.uiautomator.UiCollection](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection) |

Known direct subclasses  
[UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable)  

|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | UiScrollable is a[UiCollection](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection)and provides support for searching for items in scrollable layout elements. |

*** ** * ** ***

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](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#UiCollection(androidx.test.uiautomator.UiSelector))`(selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Constructs an instance as described by the selector |

|                                     ### Public functions                                      |
|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildByDescription(androidx.test.uiautomator.UiSelector,java.lang.String))`(childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`, text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector. |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [getChildByInstance](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildByInstance(androidx.test.uiautomator.UiSelector,int))`(childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`, instance: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector.                      |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildByText(androidx.test.uiautomator.UiSelector,java.lang.String))`(childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`, text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector.               |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                   | [getChildCount](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildCount(androidx.test.uiautomator.UiSelector))`(childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Counts child UI element instances matching the`childPattern`argument.                                                                                                                                                                                                                                           |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.test.uiautomator.UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) |---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)   | [FINGER_TOUCH_HALF_WIDTH](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#FINGER_TOUCH_HALF_WIDTH())` = 20`                                                                                                                                                                                                       | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)   | [SWIPE_MARGIN_LIMIT](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#SWIPE_MARGIN_LIMIT())` = 5`                                                                                                                                                                                                                  | | `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [WAIT_FOR_EVENT_TMEOUT](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#WAIT_FOR_EVENT_TMEOUT())` = 3000` **This property is deprecated.** use[setScrollAcknowledgmentTimeout](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/Configurator#setScrollAcknowledgmentTimeout(long)) <br /> | | `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [WAIT_FOR_SELECTOR_POLL](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#WAIT_FOR_SELECTOR_POLL())` = 1000`                                                                                                                                                                                                       | | `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [WAIT_FOR_SELECTOR_TIMEOUT](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#WAIT_FOR_SELECTOR_TIMEOUT())` = 10000` **This property is deprecated.** use[setWaitForSelectorTimeout](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/Configurator#setWaitForSelectorTimeout(long)) <br />  | | `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [WAIT_FOR_WINDOW_TMEOUT](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#WAIT_FOR_WINDOW_TMEOUT())` = 5500`                                                                                                                                                                                                       | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.test.uiautomator.UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) |---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                             | [clearTextField](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#clearTextField())`()` Clears the existing text contents in an editable field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [click](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#click())`()` Performs a click at the center of the visible bounds of the UI element represented by this UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [clickAndWaitForNewWindow](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#clickAndWaitForNewWindow())`()` Waits for window transitions that would typically take longer than the usual default timeouts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [clickAndWaitForNewWindow](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#clickAndWaitForNewWindow(long))`(timeout: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Performs a click at the center of the visible bounds of the UI element represented by this UiObject and waits for window transitions.                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [clickBottomRight](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#clickBottomRight())`()` Clicks the bottom and right corner of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [clickTopLeft](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#clickTopLeft())`()` Clicks the top and left corner of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [dragTo](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#dragTo(androidx.test.uiautomator.UiObject,int))`(destObj: `[UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)`, steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Drags this object to a destination UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [dragTo](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#dragTo(int,int,int))`(destX: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, destY: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Drags this object to arbitrary coordinates.                                                                                                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [exists](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#exists())`()` Check if view exists.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [AccessibilityNodeInfo](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html)`?` | [findAccessibilityNodeInfo](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#findAccessibilityNodeInfo(long))`(timeout: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Finds a matching UI element in the accessibility hierarchy, by using the selector for this UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                                | [getBounds](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getBounds())`()` Returns the view's`bounds`property.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)                             | [getChild](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getChild(androidx.test.uiautomator.UiSelector))`(selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Creates a new UiObject for a child view that is under the present UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                               | [getChildCount](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getChildCount())`()` Counts the child views immediately under the present UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                         | [getClassName](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getClassName())`()` Retrieves the`className`property of the UI element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                         | [getContentDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getContentDescription())`()` Reads the`content_desc`property of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)                             | [getFromParent](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getFromParent(androidx.test.uiautomator.UiSelector))`(selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Creates a new UiObject for a sibling view or a child of the sibling view, relative to the present UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                         | [getPackageName](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getPackageName())`()` Reads the view's`package`property                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)                         | [getSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getSelector())`()` Debugging helper.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                         | [getText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getText())`()` Reads the`text`property of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                                | [getVisibleBounds](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#getVisibleBounds())`()` Returns the visible bounds of the view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isCheckable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isCheckable())`()` Checks if the UI element's`checkable`property is currently true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isChecked](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isChecked())`()` Check if the UI element's`checked`property is currently true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isClickable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isClickable())`()` Checks if the UI element's`clickable`property is currently true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isEnabled](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isEnabled())`()` Checks if the UI element's`enabled`property is currently true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isFocusable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isFocusable())`()` Check if the UI element's`focusable`property is currently true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isFocused](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isFocused())`()` Check if the UI element's`focused`property is currently true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isLongClickable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isLongClickable())`()` Check if the view's`long-clickable`property is currently true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isScrollable())`()` Check if the view's`scrollable`property is currently true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [isSelected](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#isSelected())`()` Checks if the UI element's`selected`property is currently true.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [longClick](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#longClick())`()` Long clicks the center of the visible bounds of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [longClickBottomRight](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#longClickBottomRight())`()` Long clicks bottom and right corner of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [longClickTopLeft](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#longClickTopLeft())`()` Long clicks on the top and left corner of the UI element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [performMultiPointerGesture](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...))`(` ` touches: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[MotionEvent.PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords.html)`!>!>` `)` Performs a multi-touch gesture.                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [performTwoPointerGesture](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#performTwoPointerGesture(android.graphics.Point,android.graphics.Point,android.graphics.Point,android.graphics.Point,int))`(` ` startPoint1: `[Point](https://developer.android.com/reference/android/graphics/Point.html)`,` ` startPoint2: `[Point](https://developer.android.com/reference/android/graphics/Point.html)`,` ` endPoint1: `[Point](https://developer.android.com/reference/android/graphics/Point.html)`,` ` endPoint2: `[Point](https://developer.android.com/reference/android/graphics/Point.html)`,` ` steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Generates a two-pointer gesture with arbitrary starting and ending points. | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [pinchIn](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#pinchIn(int,int))`(percent: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a two-pointer gesture, where each pointer moves diagonally toward the other, from the edges to the center of this UiObject .                                                                                                                                                                                                                                                                                                                                                                         | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [pinchOut](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#pinchOut(int,int))`(percent: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a two-pointer gesture, where each pointer moves diagonally opposite across the other, from the center out towards the edges of the this UiObject.                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [setText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#setText(java.lang.String))`(text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?)` Sets the text in an editable field, after clearing the field's content.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [swipeDown](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#swipeDown(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs the swipe down action on the UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [swipeLeft](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#swipeLeft(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs the swipe left action on the UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [swipeRight](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#swipeRight(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs the swipe right action on the UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [swipeUp](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#swipeUp(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs the swipe up action on the UiObject.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [waitForExists](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#waitForExists(long))`(timeout: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Waits a specified length of time for a view to become visible.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                       | [waitUntilGone](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject#waitUntilGone(long))`(timeout: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Waits a specified length of time for a view to become undetectable.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | |

## Public constructors

### UiCollection

Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)  

```
UiCollection(selector: UiSelector)
```

Constructs an instance as described by the selector  

|                                                  Parameters                                                   |
|---------------------------------------------------------------------------------------------------------------|---|
| `selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) |   |

## Public functions

### getChildByDescription

Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)  

```
fun getChildByDescription(childPattern: UiSelector, text: String): UiObject
```

Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/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](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector of the child pattern to match and return |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | String of the identifying child contents of of the`childPattern`                                                                                   |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)pointing at and instance of`childPattern` |

|                                                                          Throws                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [androidx.test.uiautomator.UiObjectNotFoundException](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObjectNotFoundException) |   |

### getChildByInstance

Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)  

```
fun getChildByInstance(childPattern: UiSelector, instance: Int): UiObject
```

Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/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](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector of the child pattern to match and return |
| `instance: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | int the desired matched instance of this`childPattern`                                                                                             |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)pointing at and instance of`childPattern` |

|                                                                          Throws                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [androidx.test.uiautomator.UiObjectNotFoundException](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObjectNotFoundException) |   |

### getChildByText

Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)  

```
fun getChildByText(childPattern: UiSelector, text: String): UiObject
```

Searches for child UI element within the constraints of this UiCollection[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/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](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)selector of the child pattern to match and return |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | String of the identifying child contents of of the`childPattern`                                                                                   |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)pointing at and instance of`childPattern` |

|                                                                          Throws                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [androidx.test.uiautomator.UiObjectNotFoundException](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObjectNotFoundException) |   |

### getChildCount

Added in[2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)  

```
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](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | a[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)that represents the matching child UI elements to count |

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the number of matched childPattern under the current[UiCollection](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection) |