ButtonElement
Playwright element wrapper for<vaadin-button> providing lookup helpers and interaction methods.
Component Tag
vaadin-button
Implements
FocusableElement- Focus managementHasAriaLabelElement- ARIA label supportHasEnabledElement- Enable/disable stateHasPrefixElement- Prefix slot contentHasStyleElement- CSS class and style managementHasSuffixElement- Suffix slot contentHasThemeElement- Theme variant supportHasTooltipElement- Tooltip text
Constructor
Locator
required
Playwright locator for the
<vaadin-button> elementStatic Factory Methods
getByText
Get a button by its accessible name or visible text.Page
Playwright page
Locator
Scope to search within
String
Button’s accessible name or text content
GetByRoleOptions
Options for getByRole (ARIA BUTTON role)
getByLabel
Alias forgetByText(Page, String).
Methods
All methods from implemented mixin interfaces are available. See:click()- Click the buttonfocus()- Focus the buttonassertEnabled()- Assert button is enabledassertDisabled()- Assert button is disabledassertAriaLabel(String)- Assert ARIA labelgetPrefixLocator()- Get prefix slot locatorgetSuffixLocator()- Get suffix slot locatorassertTheme(String)- Assert theme variantassertTooltipHasText(String)- Assert tooltip text