Taiko
Documentation

Home / API Reference

text

This selector lets you identify an element with text. Looks for exact match if not found does contains, accepts proximity selectors.

Examples

await highlight(text('Vehicle'))
await text('Vehicle').exists()
await text('Vehicle', below('text')).exists()
await text('Vehicle', { exactMatch: true }, below('text')).exists()

Parameters


text

Text to match.


_options

_options.selectHiddenElements boolean

Option to include hidden elements.

Default value
false

options.exactMatch boolean

Option to look for exact match.

Default value
false

args relativeSelector

Proximity selectors


Returns

ElementWrapper