Function

onNodeWithText

Finds a semantics node with the given text.

onNodeWithText

Source set: Common
public fun SemanticsNodeInteractionsProvider.onNodeWithText(
    text: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
    useUnmergedTree: Boolean = false,
): SemanticsNodeInteraction

Finds a semantics node with the given text.

For usage patterns and semantics concepts see SemanticsNodeInteraction

Parameters

text The text to search for.
substring If true, allows matches where the label is a substring of the content description.
ignoreCase If true, does a case-insensitive search.
useUnmergedTree If true, searches the unmerged semantics tree instead of the merged semantics tree.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: