Const
Call this InteractorConstructor to initialize a link Interactor. The link interactor can be used to interact with links on the page and to assert on their state.
The link is located by its text.
await Link('Home').click();await Link('Home').has({ href: '/' });await Link({ id: 'home-link', href: '/' }).exists(); Copy
await Link('Home').click();await Link('Home').has({ href: '/' });await Link({ id: 'home-link', href: '/' }).exists();
title
id
href
visible
true
focused
click()
focus()
blur()
Call this InteractorConstructor to initialize a link Interactor. The link interactor can be used to interact with links on the page and to assert on their state.
The link is located by its text.
Example
Filters
title
: string – Filter by titleid
: string – Filter by idhref
: string – The value of the href attribute that the link points tovisible
: boolean – Filter by visibility. Defaults totrue
. See isVisible.focused
: boolean – Filter by whether the link is focused. See focused.Actions
click()
: Interaction – Click on the linkfocus()
: Interaction – Focus the linkblur()
: Interaction – Blur the link