Function

onRoot

Finds the root semantics node of the Compose tree.

onRoot

Source set: Common
public fun SemanticsNodeInteractionsProvider.onRoot(
    useUnmergedTree: Boolean = false
): SemanticsNodeInteraction

Finds the root semantics node of the Compose tree.

Useful for example for screenshot tests of the entire scene.

For usage patterns and semantics concepts see SemanticsNodeInteraction

Parameters

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: