hasTextExactly
@Deprecated(
message = "Replaced by hasTextExactly that includes the includeInputText parameter",
level = DeprecationLevel.HIDDEN,
)
public 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 |
hasTextExactly
public fun hasTextExactly(
vararg textValues: String,
includeEditableText: Boolean = true,
includeInputText: Boolean = false,
): SemanticsMatcher
Returns whether the node's text contains exactly the given textValues and nothing else.
By default, this searches in SemanticsProperties.Text and SemanticsProperties.EditableText. To also evaluate SemanticsProperties.InputText (which holds the raw user input of fields like passwords, bypassing visual transformations), set includeInputText to true.
Note that in the 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. Defaults to true. |
| includeInputText | Whether to also assert against the un-transformed input text. Defaults to false. |