Const
Call this InteractorConstructor to initialize a checkbox Interactor. The checkbox interactor can be used to interact with checkboxes on the page and to assert on their state.
The checkbox is located by the text of its label.
await CheckBox('Accept').check();await CheckBox('Accept').is({ disabled: true });await CheckBox({ id: 'accept', disabled: true }).exists(); Copy
await CheckBox('Accept').check();await CheckBox('Accept').is({ disabled: true });await CheckBox({ id: 'accept', disabled: true }).exists();
title
id
visible
true
valid
checked
indeterminate
disabled
false
focused
click()
focus()
blur()
check()
uncheck()
toggle()
Call this InteractorConstructor to initialize a checkbox Interactor. The checkbox interactor can be used to interact with checkboxes on the page and to assert on their state.
The checkbox is located by the text of its label.
Example
Filters
title
: string – Filter by titleid
: string – Filter by idvisible
: boolean – Filter by visibility. Defaults totrue
. See isVisible.valid
: boolean – Filter by whether the checkbox is valid.checked
: boolean – Filter by whether the checkbox is checked.indeterminate
: boolean - Filter by whether the checkbox has indeterminate state.disabled
: boolean – Filter by whether the checkbox is disabled. Defaults tofalse
.focused
: boolean – Filter by whether the checkbox is focused. See focused.Actions
click()
: Interaction – Click on the checkboxfocus()
: Interaction – Focus the checkboxblur()
: Interaction – Blur the checkboxcheck()
: Interaction – Check the checkbox if it is not checkeduncheck()
: Interaction – Uncheck the checkbox if it is checkedtoggle()
: Interaction – Toggle the checkbox