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
Section titled “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
Section titled “Parameters”| 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. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| ListItemWrapper |