# UiScrollable

# UiScrollable

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/UiScrollable.java+class:androidx.test.uiautomator.UiScrollable)  
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/UiScrollable "View this page in Java")


```
class UiScrollable : UiCollection
```

<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)    ||
|   |   | ↳ | [androidx.test.uiautomator.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. This class can be used with horizontally or vertically scrollable controls.

## Summary

|                                                                                                                                 ### Public constructors                                                                                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#UiScrollable(androidx.test.uiautomator.UiSelector))`(container: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Constructor. |

|                                         ### Public functions                                          |
|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [flingBackward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#flingBackward())`()` Performs a backwards fling action with the default number of fling steps (5).                                                                                                                                                                                                                                                                                                                                                                                                   |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [flingForward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#flingForward())`()` Performs a forward fling with the default number of fling steps (5).                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [flingToBeginning](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#flingToBeginning(int))`(maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a fling gesture to reach the beginning of a scrollable layout element.                                                                                                                                                                                                                                                                                                |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [flingToEnd](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#flingToEnd(int))`(maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a fling gesture to reach the end of a scrollable layout element.                                                                                                                                                                                                                                                                                                                  |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)         | [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#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 a child element in the present scrollable container.                                                                                                                              |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)         | [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByDescription(androidx.test.uiautomator.UiSelector,java.lang.String,boolean))`(` ` 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)`,` ` allowScrollSearch: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Searches for a child element in the present scrollable container. |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)         | [getChildByInstance](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#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 a child element in the present scrollable container that matches the selector you provided.                                                                                                            |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)         | [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#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 a child element in the present scrollable container.                                                                                                                                            |
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)         | [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByText(androidx.test.uiautomator.UiSelector,java.lang.String,boolean))`(` ` 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)`,` ` allowScrollSearch: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Searches for a child element in the present scrollable container.               |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [getMaxSearchSwipes](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getMaxSearchSwipes())`()` Gets the maximum number of scrolls allowed when performing a scroll action in search of a child element.                                                                                                                                                                                                                                                                                                                                                              |
| [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)                     | [getSwipeDeadZonePercentage](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getSwipeDeadZonePercentage())`()` Returns the percentage of a widget's size that's considered as a no-touch zone when swiping.                                                                                                                                                                                                                                                                                                                                                          |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollBackward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollBackward())`()` Performs a backward scroll with the default number of scroll steps (55).                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollBackward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollBackward(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a backward scroll.                                                                                                                                                                                                                                                                                                                                                            |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollDescriptionIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollDescriptionIntoView(java.lang.String))`(text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Performs a forward scroll action on the scrollable layout element until the content-description is found, or until swipe attempts have been exhausted.                                                                                                                                                                                         |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollForward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollForward())`()` Performs a forward scroll with the default number of scroll steps (55).                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollForward](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollForward(int))`(steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Performs a forward scroll.                                                                                                                                                                                                                                                                                                                                                               |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollIntoView(androidx.test.uiautomator.UiObject))`(obj: `[UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject)`)` Perform a forward scroll action to move through the scrollable layout element until a visible item that matches the [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) is found.                                                                                                             |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollIntoView(androidx.test.uiautomator.UiSelector))`(selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Perform a scroll forward action to move through the scrollable layout element until a visible item that matches the selector is found.                                                                                                                                                                                       |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollTextIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollTextIntoView(java.lang.String))`(text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Performs a forward scroll action on the scrollable layout element until the text you provided is visible, or until swipe attempts have been exhausted.                                                                                                                                                                                                       |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollToBeginning](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollToBeginning(int))`(maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Scrolls to the beginning of a scrollable layout element.                                                                                                                                                                                                                                                                                                                     |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollToBeginning](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollToBeginning(int,int))`(maxSwipes: `[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)`)` Scrolls to the beginning of a scrollable layout element.                                                                                                                                                                                                                           |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollToEnd](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollToEnd(int))`(maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Scrolls to the end of a scrollable layout element.                                                                                                                                                                                                                                                                                                                                       |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                   | [scrollToEnd](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollToEnd(int,int))`(maxSwipes: `[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)`)` Scrolls to the end of a scrollable layout element.                                                                                                                                                                                                                                             |
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | [setAsHorizontalList](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setAsHorizontalList())`()` Set the direction of swipes to be horizontal when performing scroll actions.                                                                                                                                                                                                                                                                                                                                                                                        |
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | [setAsVerticalList](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setAsVerticalList())`()` Set the direction of swipes to be vertical when performing scroll actions.                                                                                                                                                                                                                                                                                                                                                                                              |
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | [setMaxSearchSwipes](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setMaxSearchSwipes(int))`(swipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the maximum number of scrolls allowed when performing a scroll action in search of a child element.                                                                                                                                                                                                                                                                      |
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | [setSwipeDeadZonePercentage](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setSwipeDeadZonePercentage(double))`(swipeDeadZonePercentage: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)`)` Sets the percentage of a widget's size that's considered as no-touch zone when swiping.                                                                                                                                                                                                                                             |

|                               ### Protected functions                               |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [exists](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#exists(androidx.test.uiautomator.UiSelector))`(selector: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector)`)` Used privately when performing swipe searches to decide if an element has become visible or not. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ### 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.UiCollection](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection) |-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [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. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 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

### UiScrollable

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

```
UiScrollable(container: UiSelector)
```

Constructor.  

|                                                   Parameters                                                   |
|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `container: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | a [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) selector to identify the scrollable layout element. |

## Public functions

### flingBackward

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

```
fun flingBackward(): Boolean
```

Performs a backwards fling action with the default number of fling steps (5). If the swipe direction is set to vertical, then the swipe will be performed from top to bottom. If the swipe direction is set to horizontal, then the swipes will be performed from left to right. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, and false if can't scroll anymore |

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

### flingForward

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

```
fun flingForward(): Boolean
```

Performs a forward fling with the default number of fling steps (5). If the swipe direction is set to vertical, then the swipes will be performed from bottom to top. If the swipe direction is set to horizontal, then the swipes will be performed from right to left. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, false if can't scroll anymore |

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

### flingToBeginning

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

```
fun flingToBeginning(maxSwipes: Int): Boolean
```

Performs a fling gesture to reach the beginning of a scrollable layout element. The beginning can be at the top-most edge in the case of vertical controls, or the left-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|----------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of flings allowed |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if beginning reached within maxSwipes |

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

### flingToEnd

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

```
fun flingToEnd(maxSwipes: Int): Boolean
```

Performs a fling gesture to reach the end of a scrollable layout element. The end can be at the bottom-most edge in the case of vertical controls, or the right-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|----------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of flings allowed |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if end reached within maxSwipes |

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

### getChildByDescription

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

Searches for a child element in the present scrollable container. The search first looks for a child element that matches the selector you provided, then looks for the content-description in its children elements. If both search conditions are fulfilled, the method returns a [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the element matching the selector (not the child element in its subhierarchy containing the content-description). By default, this method performs a scroll search. See [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByDescription(androidx.test.uiautomator.UiSelector,java.lang.String,boolean))  

|                                                    Parameters                                                     |
|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) for a child in a scollable layout element |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | Content-description to find in the children of the `childPattern` match                                                                     |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the child element that matches the search conditions |

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

### getChildByDescription

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

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

Searches for a child element in the present scrollable container. The search first looks for a child element that matches the selector you provided, then looks for the content-description in its children elements. If both search conditions are fulfilled, the method returns a [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the element matching the selector (not the child element in its subhierarchy containing 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) for a child in a scollable layout element |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | Content-description to find in the children of the `childPattern` match (may be a partial match)                                            |
| `allowScrollSearch: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)          | set to true if scrolling is allowed                                                                                                         |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the child element that matches the search conditions |

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

### getChildByInstance

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

Searches for a child element in the present scrollable container that matches the selector you provided. The search is performed without scrolling and only on visible elements.  

|                                                    Parameters                                                     |
|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `childPattern: `[UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) | [UiSelector](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiSelector) for a child in a scollable layout element |
| `instance: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | int number representing the occurance of a `childPattern` match                                                                             |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the child element that matches the search conditions |

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

### getChildByText

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

Searches for a child element in the present scrollable container. The search first looks for a child element that matches the selector you provided, then looks for the text in its children elements. If both search conditions are fulfilled, the method returns a [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the element matching the selector (not the child element in its subhierarchy containing the text). By default, this method performs a scroll search. See [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByText(androidx.test.uiautomator.UiSelector,java.lang.String,boolean))  

|                                                    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 for a child in a scrollable layout element |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | String to find in the children of the `childPattern` match                                                                                            |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the child element that matches the search conditions |

|                                                                          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,
    allowScrollSearch: Boolean
): UiObject
```

Searches for a child element in the present scrollable container. The search first looks for a child element that matches the selector you provided, then looks for the text in its children elements. If both search conditions are fulfilled, the method returns a [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the element matching the selector (not the child element in its subhierarchy containing the text).  

|                                                    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 for a child in a scrollable layout element |
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                         | String to find in the children of the `childPattern` match                                                                                            |
| `allowScrollSearch: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)          | set to true if scrolling is allowed                                                                                                                   |

|                                            Returns                                            |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) | [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) representing the child element that matches the search conditions |

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

### getMaxSearchSwipes

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

```
fun getMaxSearchSwipes(): Int
```

Gets the maximum number of scrolls allowed when performing a scroll action in search of a child element. See [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildByDescription(androidx.test.uiautomator.UiSelector,java.lang.String)) and [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByText(androidx.test.uiautomator.UiSelector,java.lang.String)).  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | max the number of search swipes to perform until giving up |

### getSwipeDeadZonePercentage

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

```
fun getSwipeDeadZonePercentage(): Double
```

Returns the percentage of a widget's size that's considered as a no-touch zone when swiping. The no-touch zone is set as a percentage of a widget's total width or height, denoting a margin around the swipable area of the widget. Swipes must start and end inside this margin. This is important when the widget being swiped may not respond to the swipe if started at a point too near to the edge. The default is 10% from either edge.  

|                                      Returns                                      |
|-----------------------------------------------------------------------------------|-------------------------|
| [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) | a value between 0 and 1 |

### scrollBackward

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

```
fun scrollBackward(): Boolean
```

Performs a backward scroll with the default number of scroll steps (55). If the swipe direction is set to vertical, then the swipes will be performed from top to bottom. If the swipe direction is set to horizontal, then the swipes will be performed from left to right. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, and false if can't scroll anymore |

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

### scrollBackward

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

```
fun scrollBackward(steps: Int): Boolean
```

Performs a backward scroll. If the swipe direction is set to vertical, then the swipes will be performed from top to bottom. If the swipe direction is set to horizontal, then the swipes will be performed from left to right. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                      Parameters                                      |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| `steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | number of steps. Use this to control the speed of the scroll action. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, false if can't scroll anymore |

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

### scrollDescriptionIntoView

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

```
fun scrollDescriptionIntoView(text: String): Boolean
```

Performs a forward scroll action on the scrollable layout element until the content-description is found, or until swipe attempts have been exhausted. See [setMaxSearchSwipes](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setMaxSearchSwipes(int))  

|                                        Parameters                                         |
|-------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | content-description to find within the contents of this scrollable layout element. |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if item is found; else, false |

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

### scrollForward

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

```
fun scrollForward(): Boolean
```

Performs a forward scroll with the default number of scroll steps (55). If the swipe direction is set to vertical, then the swipes will be performed from bottom to top. If the swipe direction is set to horizontal, then the swipes will be performed from right to left. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, false if can't scroll anymore |

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

### scrollForward

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

```
fun scrollForward(steps: Int): Boolean
```

Performs a forward scroll. If the swipe direction is set to vertical, then the swipes will be performed from bottom to top. If the swipe direction is set to horizontal, then the swipes will be performed from right to left. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                      Parameters                                      |
|--------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| `steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | number of steps. Use this to control the speed of the scroll action |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if scrolled, false if can't scroll anymore |

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

### scrollIntoView

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

```
fun scrollIntoView(obj: UiObject): Boolean
```

Perform a forward scroll action to move through the scrollable layout element until a visible item that matches the [UiObject](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiObject) is found.  

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

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|----------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if the item was found and now is in view else false |

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

### scrollIntoView

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

```
fun scrollIntoView(selector: UiSelector): Boolean
```

Perform a scroll forward action to move through the scrollable layout element until a visible item that matches the selector is found. See [scrollDescriptionIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollDescriptionIntoView(java.lang.String)) and [scrollTextIntoView](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#scrollTextIntoView(java.lang.String)).  

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

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if the item was found and now is in view; else, false |

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

### scrollTextIntoView

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

```
fun scrollTextIntoView(text: String): Boolean
```

Performs a forward scroll action on the scrollable layout element until the text you provided is visible, or until swipe attempts have been exhausted. See [setMaxSearchSwipes](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#setMaxSearchSwipes(int))  

|                                        Parameters                                         |
|-------------------------------------------------------------------------------------------|------------------|
| `text: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | test to look for |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if item is found; else, false |

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

### scrollToBeginning

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

```
fun scrollToBeginning(maxSwipes: Int): Boolean
```

Scrolls to the beginning of a scrollable layout element. The beginning can be at the top-most edge in the case of vertical controls, or the left-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|-----------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of scrolls allowed |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if beginning reached within maxSwipes |

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

### scrollToBeginning

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

```
fun scrollToBeginning(maxSwipes: Int, steps: Int): Boolean
```

Scrolls to the beginning of a scrollable layout element. The beginning can be at the top-most edge in the case of vertical controls, or the left-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of scrolls allowed                                    |
| `steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)     | use steps to control the speed, so that it may be a scroll, or fling |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if beginning reached within maxSwipes |

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

### scrollToEnd

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

```
fun scrollToEnd(maxSwipes: Int): Boolean
```

Scrolls to the end of a scrollable layout element. The end can be at the bottom-most edge in the case of vertical controls, or the right-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|-----------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of scrolls allowed |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if end reached within maxSwipes |

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

### scrollToEnd

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

```
fun scrollToEnd(maxSwipes: Int, steps: Int): Boolean
```

Scrolls to the end of a scrollable layout element. The end can be at the bottom-most edge in the case of vertical controls, or the right-most edge for horizontal controls. Make sure to take into account devices configured with right-to-left languages like Arabic and Hebrew.  

|                                        Parameters                                        |
|------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| `maxSwipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | maximum number of scrolls allowed                                    |
| `steps: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)     | use steps to control the speed, so that it may be a scroll, or fling |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if end reached within maxSwipes |

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

### setAsHorizontalList

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

```
fun setAsHorizontalList(): UiScrollable
```

Set the direction of swipes to be horizontal when performing scroll actions.  

|                                                Returns                                                |
|-------------------------------------------------------------------------------------------------------|---------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | reference to itself |

### setAsVerticalList

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

```
fun setAsVerticalList(): UiScrollable
```

Set the direction of swipes to be vertical when performing scroll actions.  

|                                                Returns                                                |
|-------------------------------------------------------------------------------------------------------|---------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | reference to itself |

### setMaxSearchSwipes

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

```
fun setMaxSearchSwipes(swipes: Int): UiScrollable
```

Sets the maximum number of scrolls allowed when performing a scroll action in search of a child element. See [getChildByDescription](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiCollection#getChildByDescription(androidx.test.uiautomator.UiSelector,java.lang.String)) and [getChildByText](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable#getChildByText(androidx.test.uiautomator.UiSelector,java.lang.String)).  

|                                      Parameters                                       |
|---------------------------------------------------------------------------------------|--------------------------------------------------------|
| `swipes: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the number of search swipes to perform until giving up |

|                                                Returns                                                |
|-------------------------------------------------------------------------------------------------------|---------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | reference to itself |

### setSwipeDeadZonePercentage

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

```
fun setSwipeDeadZonePercentage(swipeDeadZonePercentage: Double): UiScrollable
```

Sets the percentage of a widget's size that's considered as no-touch zone when swiping. The no-touch zone is set as percentage of a widget's total width or height, denoting a margin around the swipable area of the widget. Swipes must always start and end inside this margin. This is important when the widget being swiped may not respond to the swipe if started at a point too near to the edge. The default is 10% from either edge.  

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|----------------------------|
| `swipeDeadZonePercentage: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) | is a value between 0 and 1 |

|                                                Returns                                                |
|-------------------------------------------------------------------------------------------------------|---------------------|
| [UiScrollable](https://developer.android.com/reference/kotlin/androidx/test/uiautomator/UiScrollable) | reference to itself |

## Protected functions

### exists

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

```
protected fun exists(selector: UiSelector): Boolean
```

Used privately when performing swipe searches to decide if an element has become visible or not.  

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

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if found else false |