performCustomAccessibilityActionWithLabelMatching

Function

Common
@ExperimentalTestApi
fun SemanticsNodeInteraction.performCustomAccessibilityActionWithLabelMatching(
    predicateDescription: String? = null,
    labelPredicate: (label: String) -> Boolean,
): SemanticsNodeInteraction

Finds the CustomAccessibilityAction in the node's CustomActions list whose label satisfies a predicate function and then invokes it.

Parameters

predicateDescriptionA description of labelPredicate that will be included in the error message if zero or >1 actions match.
labelPredicateA predicate function used to select the CustomAccessibilityAction to perform.