getTextByResourceId

fun getTextByResourceId(currentViewHierarchy: ViewHierarchyTreeNode?, resourceId: String, index: Int = 0): String

Gets the text content of an element identified by resource ID.

Return

The text content of the element

Parameters

resourceId

The resource ID to locate the element

index

The index of the element if multiple elements share the same resource ID (0-based)