or getScale(id).test.selected( value )

Tests whether a button is selected.

If you pass a value, it will check that it matches the label of the selected button if it has a label, its index otherwise. If you do not pass a value, it simply checks that a selection happened.


[js highlight=”7″ try=”true”]newScale(“score”, 5)
.settings.before( newText(“label”, “Score: “) )
newButton(“validation”, “Validate”)
.wait( getScale(“score”).test.selected() )

Adds a 5-point radio-button scale and a Validate button to the screen. Clicking on the Validate button is successful only when a radio button is selected.