🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

filterToOne

Expects to return exactly one node matching the given matcher.

filterToOne

Source set: Common
public fun SemanticsNodeInteractionCollection.filterToOne(
    matcher: SemanticsMatcher
): SemanticsNodeInteraction

Expects to return exactly one node matching the given matcher.

Any subsequent operation on its result will expect exactly one element found (unless SemanticsNodeInteraction.assertDoesNotExist is used) and will throw AssertionError if no element is found.

Parameters

matcher Matcher to use for the filtering.

Content updated: