assertHasAccessibilityRole

fun assertHasAccessibilityRole(viewTree: ViewTree, accessibilityRole: String)

Asserts that a ViewTree contains a view with a NodeInfo that has the specified accessibility role.

Parameters

viewTree

the ViewTree to search

accessibilityRole

the accessibility role to search for

Throws

if no view with the specified accessibility role is found