Const
Call this InteractorConstructor to initialize a button Interactor. The button interactor can be used to interact with buttons on the page and to assert on their state.
The button is located by the visible text on the button.
await Button('Submit').click();await Button('Submit').is({ disabled: true });await Button({ id: 'submit-button', disabled: true }).exists(); Copy
await Button('Submit').click();await Button('Submit').is({ disabled: true });await Button({ id: 'submit-button', disabled: true }).exists();
title
id
visible
true
disabled
false
focused
click()
focus()
blur()
Call this InteractorConstructor to initialize a button Interactor. The button interactor can be used to interact with buttons on the page and to assert on their state.
The button is located by the visible text on the button.
Example
Filters
title
: string – Filter by titleid
: string – Filter by idvisible
: boolean – Filter by visibility. Defaults totrue
. See isVisible.disabled
: boolean – Filter by whether the button is disabled. Defaults tofalse
.focused
: boolean – Filter by whether the button is focused. See focused.Actions
click()
: Interaction – Click on the buttonfocus()
: Interaction – Move focus to the buttonblur()
: Interaction – Move focus away from the button