containsText

fun View.containsText(expected: String, substring: Boolean = false): Boolean(source)

Returns whether this view or a descendant is a TextView showing expected, including text inside AndroidView interop content that Compose semantics cannot see.

Return

true when a matching TextView exists.

Parameters

expected

The text to find.

substring

Whether a partial match is enough.