performCustomAccessibilityActionWithLabelMatching
Source set: Common
public 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
| predicateDescription | A description of labelPredicate that will be included in the error message if zero or >1 actions match. |
| labelPredicate | A predicate function used to select the CustomAccessibilityAction to perform. |
Throws: AssertionError
If no SemanticsNode is found, or no CustomAccessibilityAction matches labelPredicate, or more than one CustomAccessibilityAction matches labelPredicate.