isSelected

fun isSelected(selected: Boolean = true): SwingMatcher

Matches a component whose selected state equals selected, read from AbstractButton.isSelected - the state a check box, radio button, toggle button or checkable menu item carries. A component that carries no selected state never matches, in either direction, so isSelected(false) asserts "carries a selection and is off" while !isSelected() also admits a component that cannot be selected at all.

Parameters

selected

the state to require, true by default.