CheckBox Elements
Overview
Watir::CheckBox
is a very straightforward element that can be toggled on and off
without many restrictions. Watir ensures it is enabled before clicking.
It is accessed by calling Browser#checkbox
.
Creating a CheckBoxCollection
is accomplished with Browser#checkboxes
.
For all of the different ways of locating a CheckBox
element,
take a look at our Locating Elements Guide.
Checkboxes also inherit methods from standard Web Elements
Common or Special Methods
Standard Setter Interface
CheckBox#set
is an alias of check
and takes a boolean argument.
When the value is true
, Watir ensures that the element is checked.
When the value is false
, Watir ensures that the element is not checked.