onNodeWithText

fun onNodeWithText(text: @Nls String, substring: Boolean = false): SwingNodeInteraction<Component>

Finds the single node inside this window's content whose text equals text (or contains it when substring is true).

Return

a handle that fails on use unless exactly one node in this window matches.

Parameters

text

matched against a label's, button's or text component's own text.

substring

true matches text that merely contains text; false by default.