Function

onRootWithViewInteraction

Scopes Compose interactions to the View hierarchy matched by an Espresso ViewInteraction.

onRootWithViewInteraction

Source set: Android
public fun ComposeUiTest.onRootWithViewInteraction(
    interaction: ViewInteraction
): SemanticsNodeInteractionsProvider

Scopes Compose interactions to the View hierarchy matched by an Espresso ViewInteraction.

Resolves the View from interaction, locates all Compose roots within that hierarchy, and creates a scoped SemanticsNodeInteractionsProvider.

Parameters

interaction ViewInteraction matching the target View hierarchy

Return

scoped SemanticsNodeInteractionsProvider for the matched View hierarchy

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: