link()
This selector lets you identify a link on a web page with text or attribute and value pairs and proximity selectors.
Examples
Section titled “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
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 |
text | string | The link text. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| LinkWrapper |