hasTextExactly
Function
Common
fun hasTextExactly(
vararg textValues: String,
includeEditableText: Boolean = true,
): SemanticsMatcher
Returns whether the node's text contains exactly the given textValues
and nothing else.
This will also search in SemanticsProperties.EditableText
by default.
Note that in merged semantics tree there can be a list of text items that got merged from the child nodes. Typically an accessibility tooling will decide based on its heuristics which ones to use.
Parameters
textValues | List of values to match (the order does not matter) |
includeEditableText | Whether to also assert against the editable text |