get Text By Text
fun getTextByText(currentViewHierarchy: ViewHierarchyTreeNode?, text: String, index: Int = 0): String
Gets the text content of an element identified by its text.
Return
The text content of the element
Parameters
text
The text to locate the element
index
The index of the element if multiple elements share the same text (0-based)