Skip to content

listItem()

This selector lets you identify a list item (HTML <li> element) on a web page with label or attribute and value pairs and proximity selectors.

await highlight(listItem('Get Started'))
await listItem('Get Started').exists()
await listItem({id:'listId'}).exists()
await listItem({id:'listItemId'},below('text')).exists()
await listItem(below('text')).exists()
Name Type Description
attrValuePairs Object Pairs of attribute and value like {“id”:“name”,“class”:“class-name”}
_options Object Default: {}.
args relativeSelector Proximity selectors
label string The label of the list item.
Type Description
ListItemWrapper