waitForText

fun ComposeUiTest.waitForText(text: String, substring: Boolean = false, timeout: Duration = DefaultUiTimeout, useUnmergedTree: Boolean = false): SemanticsNodeInteraction(source)

Waits until a node showing text is displayed and returns it.

Return

The displayed node.

Parameters

text

The text to find.

substring

Whether a partial match is enough.

timeout

The nonnegative wait budget.

useUnmergedTree

Whether to search the unmerged semantics tree.

fun ComposeTestRule.waitForText(text: String, substring: Boolean = false, timeout: Duration = DefaultUiTimeout, useUnmergedTree: Boolean = false): SemanticsNodeInteraction(source)

Waits until a node showing text is displayed and returns it.

Return

The displayed node.

Parameters

text

The text to find.

substring

Whether a partial match is enough.

timeout

The nonnegative wait budget.

useUnmergedTree

Whether to search the unmerged semantics tree.