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.

Examples

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

Parameters

Name Type Description
attrValuePairs Object Pairs of attribute and value like {“id”:“name”,“class”:“class-name”}
_options Object Default: {}.
args relativeSelector Proximity selectors
text string The link text.

Returns

Type Description
LinkWrapper