hasTitle

fun hasTitle(title: @Nls String): SwingMatcher

Matches a component whose title equals title, read from Frame.getTitle, Dialog.getTitle or JInternalFrame.getTitle. Use it with ComposeSwingTest.onWindow to pick one window out of several, and with a node query to assert the title of a frame standing on a desktop.

Return

a matcher whose description names this condition.

Parameters

title

the exact title; a component that carries no title of its own never matches. A Frame built without one carries the empty string, so hasTitle("") picks it out, while a Dialog's title may be null.