Function

onFirst

Returns the first node in this collection.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

onFirst

Common
@CheckResult
fun SemanticsNodeInteractionCollection.onFirst(): SemanticsNodeInteraction

Returns the first node in this collection.

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.