Skip to content

link()

This selector lets you identify a link on a web page with text or attribute and value pairs and proximity selectors.

await click(link('Get Started'))
await link('Get Started').exists()
await link({id:'linkId'}).exists()
await link({id:'linkId'},below('text')).exists()
await link(below('text')).exists()
NameTypeDescription
attrValuePairsObjectPairs of attribute and value like {“id”:“name”,“class”:“class-name”}
_optionsObjectDefault: {}.
argsrelativeSelectorProximity selectors
textstringThe link text.
TypeDescription
LinkWrapper