Taiko
Documentation

Home / API Reference

checkBox

This selector lets you identify a checkbox on a web page either with label or with attribute and value pairs and proximity selectors.

Examples

await checkBox('Vehicle').check()
await checkBox('Vehicle').uncheck()
await checkBox('Vehicle').isChecked()
await checkBox('Vehicle').exists()
await checkBox({id:'checkBoxId'},below('text')).exists()
await checkBox(below('text')).exists()

Parameters


attrValuePairs

Pairs of attribute and value like {"id":"name","class":"class-name"}


_options

_options.selectHiddenElements boolean

Option to include hidden elements.

Default value
false

label

The label (human-visible name) of the check box.


args relativeSelector

Proximity selectors


Returns

ElementWrapper