# Until

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/Until.java+class:androidx.test.uiautomator.Until) Added in [2.2.0](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.2.0)

*** ** * ** ***


```
public class Until
```

<br />

*** ** * ** ***

The `https://developer.android.com/reference/androidx/test/uiautomator/Until` class provides factory methods for constructing common conditions.

## Summary

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#checkable(boolean)(boolean isCheckable)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s checkable state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#checked(boolean)(boolean isChecked)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s checked state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#clickable(boolean)(boolean isClickable)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s clickable state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descContains(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's content description contains the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descEndsWith(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's content description ends with the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descEquals(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html contentDescription)` Returns a condition that is satisfied when the object's content description exactly matches the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descMatches(java.util.regex.Pattern)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/regex/Pattern.html regex)` Returns a condition that is satisfied when the object's content description matches the given regex. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descMatches(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html regex)` Returns a condition that is satisfied when the object's content description matches the given regex. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#descStartsWith(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's content description starts with the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#enabled(boolean)(boolean isEnabled)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s enabled state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition<https://developer.android.com/reference/androidx/test/uiautomator/UiObject2>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#findObject(androidx.test.uiautomator.BySelector)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/BySelector selector)` Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/test/uiautomator/UiObject2>>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#findObjects(androidx.test.uiautomator.BySelector)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/BySelector selector)` Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#focusable(boolean)(boolean isFocusable)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s focusable state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#focused(boolean)(boolean isFocused)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s focused state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#gone(androidx.test.uiautomator.BySelector)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/BySelector selector)` Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when no elements matching the selector can be found. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#hasObject(androidx.test.uiautomator.BySelector)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/BySelector selector)` Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#longClickable(boolean)(boolean isLongClickable)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s long clickable state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/EventCondition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#newWindow()()` Returns a condition that depends on a new window having appeared. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/EventCondition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#scrollFinished(androidx.test.uiautomator.Direction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/Direction direction)` Returns a condition that depends on a scroll having reached the end in the given `direction`. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#scrollable(boolean)(boolean isScrollable)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s scrollable state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#selected(boolean)(boolean isSelected)` Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s selected state. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textContains(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's text value contains the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textEndsWith(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's text value ends with the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textEquals(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html text)` Returns a condition that is satisfied when the object's text value exactly matches the given string (case-sensitive). |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textMatches(java.util.regex.Pattern)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/regex/Pattern.html regex)` Returns a condition that is satisfied when the object's text value matches the given regex. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textMatches(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html regex)` Returns a condition that is satisfied when the object's text value matches the given regex. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textNotEquals(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html text)` Returns a condition that is satisfied when the object's text value does not match the given string. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/UiObject2Condition<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/test/uiautomator/Until#textStartsWith(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html substring)` Returns a condition that is satisfied when the object's text value starts with the given string (case-sensitive). |

## Public methods

### checkable

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

```
public static @NonNull UiObject2Condition<Boolean> checkable(boolean isCheckable)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s checkable state.

| Parameters |
|---|---|
| `boolean isCheckable` | Whether the object should be checkable to satisfy this condition. |

### checked

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

```
public static @NonNull UiObject2Condition<Boolean> checked(boolean isChecked)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s checked state.

| Parameters |
|---|---|
| `boolean isChecked` | Whether the object should be checked to satisfy this condition. |

### clickable

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

```
public static @NonNull UiObject2Condition<Boolean> clickable(boolean isClickable)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s clickable state.

| Parameters |
|---|---|
| `boolean isClickable` | Whether the object should be clickable to satisfy this condition. |

### descContains

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

```
public static @NonNull UiObject2Condition<Boolean> descContains(@NonNull String substring)
```

Returns a condition that is satisfied when the object's content description contains the given string (case-sensitive).

### descEndsWith

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

```
public static @NonNull UiObject2Condition<Boolean> descEndsWith(@NonNull String substring)
```

Returns a condition that is satisfied when the object's content description ends with the given string (case-sensitive).

### descEquals

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

```
public static @NonNull UiObject2Condition<Boolean> descEquals(@NonNull String contentDescription)
```

Returns a condition that is satisfied when the object's content description exactly matches the given string (case-sensitive).

### descMatches

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

```
public static @NonNull UiObject2Condition<Boolean> descMatches(@NonNull Pattern regex)
```

Returns a condition that is satisfied when the object's content description matches the given regex.

### descMatches

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

```
public static @NonNull UiObject2Condition<Boolean> descMatches(@NonNull String regex)
```

Returns a condition that is satisfied when the object's content description matches the given regex.

### descStartsWith

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

```
public static @NonNull UiObject2Condition<Boolean> descStartsWith(@NonNull String substring)
```

Returns a condition that is satisfied when the object's content description starts with the given string (case-sensitive).

### enabled

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

```
public static @NonNull UiObject2Condition<Boolean> enabled(boolean isEnabled)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s enabled state.

| Parameters |
|---|---|
| `boolean isEnabled` | Whether the object should be enabled to satisfy this condition. |

### findObject

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

```
public static @NonNull SearchCondition<UiObject2> findObject(@NonNull BySelector selector)
```

Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found. The condition will return the first matching element.

### findObjects

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

```
public static @NonNull SearchCondition<List<UiObject2>> findObjects(@NonNull BySelector selector)
```

Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found. The condition will return all matching elements.

### focusable

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

```
public static @NonNull UiObject2Condition<Boolean> focusable(boolean isFocusable)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s focusable state.

| Parameters |
|---|---|
| `boolean isFocusable` | Whether the object should be focusable to satisfy this condition. |

### focused

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

```
public static @NonNull UiObject2Condition<Boolean> focused(boolean isFocused)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s focused state.

| Parameters |
|---|---|
| `boolean isFocused` | Whether the object should be focused to satisfy this condition. |

### gone

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

```
public static @NonNull SearchCondition<Boolean> gone(@NonNull BySelector selector)
```

Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when no elements matching the selector can be found.

### hasObject

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

```
public static @NonNull SearchCondition<Boolean> hasObject(@NonNull BySelector selector)
```

Returns a `https://developer.android.com/reference/androidx/test/uiautomator/SearchCondition` that is satisfied when at least one element matching the selector can be found.

### longClickable

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

```
public static @NonNull UiObject2Condition<Boolean> longClickable(boolean isLongClickable)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s long clickable state.

| Parameters |
|---|---|
| `boolean isLongClickable` | Whether the object should be long clickable to satisfy this condition. |

### newWindow

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

```
public static @NonNull EventCondition<Boolean> newWindow()
```

Returns a condition that depends on a new window having appeared.

### scrollFinished

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

```
public static @NonNull EventCondition<Boolean> scrollFinished(@NonNull Direction direction)
```

Returns a condition that depends on a scroll having reached the end in the given `direction`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/test/uiautomator/Direction direction` | The direction of the scroll. |

### scrollable

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

```
public static @NonNull UiObject2Condition<Boolean> scrollable(boolean isScrollable)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s scrollable state.

| Parameters |
|---|---|
| `boolean isScrollable` | Whether the object should be scrollable to satisfy this condition. |

### selected

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

```
public static @NonNull UiObject2Condition<Boolean> selected(boolean isSelected)
```

Returns a condition that depends on a `https://developer.android.com/reference/androidx/test/uiautomator/UiObject2`'s selected state.

| Parameters |
|---|---|
| `boolean isSelected` | Whether the object should be selected to satisfy this condition. |

### textContains

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

```
public static @NonNull UiObject2Condition<Boolean> textContains(@NonNull String substring)
```

Returns a condition that is satisfied when the object's text value contains the given string (case-sensitive).

### textEndsWith

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

```
public static @NonNull UiObject2Condition<Boolean> textEndsWith(@NonNull String substring)
```

Returns a condition that is satisfied when the object's text value ends with the given string (case-sensitive).

### textEquals

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

```
public static @NonNull UiObject2Condition<Boolean> textEquals(@NonNull String text)
```

Returns a condition that is satisfied when the object's text value exactly matches the given string (case-sensitive).

### textMatches

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

```
public static @NonNull UiObject2Condition<Boolean> textMatches(@NonNull Pattern regex)
```

Returns a condition that is satisfied when the object's text value matches the given regex.

### textMatches

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

```
public static @NonNull UiObject2Condition<Boolean> textMatches(@NonNull String regex)
```

Returns a condition that is satisfied when the object's text value matches the given regex.

### textNotEquals

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

```
public static @NonNull UiObject2Condition<Boolean> textNotEquals(@NonNull String text)
```

Returns a condition that is satisfied when the object's text value does not match the given string.

### textStartsWith

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

```
public static @NonNull UiObject2Condition<Boolean> textStartsWith(@NonNull String substring)
```

Returns a condition that is satisfied when the object's text value starts with the given string (case-sensitive).