ElementWait

Wait builder returned by App.await / Screen.await / Element.await. visible, one and gone poll on the device in a single RPC; property waits poll snapshots from the host with delay-based polling, so test-root cancellation and sibling failure cancel them promptly.

All terminal methods are suspend and require an owning scope (tapScope/tapTest).

Functions

Link copied to clipboard
suspend fun checked(): Element

Wait until the one matching node is checked.

Link copied to clipboard
suspend fun count(expected: Int): Element

Waits until exactly expected matches are visible.

Link copied to clipboard
suspend fun disabled(): Element

Wait until the one matching node is disabled.

Link copied to clipboard
suspend fun enabled(): Element

Wait until the one matching node is enabled.

Link copied to clipboard
suspend fun focused(): Element

Wait until the one matching node has focus.

Link copied to clipboard
suspend fun gone()

Waits until no match exists. A timeout's reason is WaitReason.STILL_PRESENT, with the count.

Link copied to clipboard
suspend fun one(): Element

Waits until exactly one match exists — what a mutation such as tap() needs — and returns the lazy element. A timeout's WaitTimeoutException.reason is WaitReason.NO_MATCH or WaitReason.AMBIGUOUS with WaitTimeoutException.matchCount from the last poll.

Link copied to clipboard
suspend fun textContains(part: String): Element

Wait until the one matching node's text contains part.

Link copied to clipboard
suspend fun textEquals(expected: String): Element

Wait until the one matching node's text equals expected.

Link copied to clipboard
suspend fun unchecked(): Element

Wait until the one matching node is unchecked.

Link copied to clipboard
suspend fun visible(): Element

Waits until at least one match exists; returns the lazy element. A timeout's WaitTimeoutException.reason is WaitReason.NO_MATCH.