Taiko
Documentation

Home / API Reference

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.

Examples

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()

Parameters


label

The label of the list item.


_options

attrValuePairs

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


args relativeSelector

Proximity selectors


Returns

ListItemWrapper