Const
Use this InteractorConstructor as a base for creating interactors which work with HTML elements. This provides some basic functionality which is convenient for most HTML elements.
const Link = HTML.extend<HTMLLinkElement>('link') .selector('a[href]') .filters({ href: (element) => element.href }) Copy
const Link = HTML.extend<HTMLLinkElement>('link') .selector('a[href]') .filters({ href: (element) => element.href })
classList
className
title
id
text
visible
true
focused
click()
focus()
blur()
Use this InteractorConstructor as a base for creating interactors which work with HTML elements. This provides some basic functionality which is convenient for most HTML elements.
Example
Filters
classList
: string[] — Filter by the list of classes found in element'sclassName
className
: string — Filter by element'sclassName
title
: string – Filter by titleid
: string – Filter by idtext
: string – Filter by the text content of this element.visible
: boolean – Filter by visibility. Defaults totrue
. See isVisible.focused
: boolean – Filter by whether the element is focused. See focused.Actions
click()
: Interaction – Click on the elementfocus()
: Interaction – Move focus to the elementblur()
: Interaction – Move focus away from the element