HTMLvariable
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
const Link = HTML.extend<HTMLLinkElement>('link')
.selector('a[href]')
.filters({
href: (element) => element.href
})
Filters
classList: string[] — Filter by the list of classes found in element'sclassNameclassName: string — Filter by element'sclassNametitle: string – Filter by titleid: string – Filter by idtext: string – Filter by the text content of this element.visible: boolean – Filter by visibility. Defaults totrue. SeeisVisible.focused: boolean – Filter by whether the element is focused. Seefocused.
Actions
click():Interaction– Click on the elementfocus():Interaction– Move focus to the elementblur():Interaction– Move focus away from the element