Function

performCustomAccessibilityActionWithLabelMatching

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

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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: