Variable CheckBoxConst

CheckBox: any = CheckBoxInteractor

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();
  • title: string – Filter by title
  • id: string – Filter by id
  • visible: boolean – Filter by visibility. Defaults to true. 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 to false.
  • focused: boolean – Filter by whether the checkbox is focused. See focused.
  • click(): Interaction – Click on the checkbox
  • focus(): Interaction – Focus the checkbox
  • blur(): Interaction – Blur the checkbox
  • check(): Interaction – Check the checkbox if it is not checked
  • uncheck(): Interaction – Uncheck the checkbox if it is checked
  • toggle(): Interaction – Toggle the checkbox