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