Skip to main content

TabElement

Playwright element wrapper for <vaadin-tab> within a TabSheet or Tabs component.

Component Tag

vaadin-tab
  • vaadin-tabs - Parent tabs container

Constructor

Locator
required
Playwright locator for the <vaadin-tab> element

Static Factory Methods

getTabByText

Get a tab by visible text within a scope.
Locator
Scope to search within (typically tabsheet or tabs element)
String
Tab text content

getSelectedTab

Get the currently selected tab within a scope.
Locator
Scope to search within (typically tabsheet or tabs element)

Methods

isSelected

Whether the tab is currently selected.

select

Select the tab by clicking it.

getLabel

Get the tab label text.

Assertion Methods

assertSelected

Assert that the tab is selected.

assertNotSelected

Assert that the tab is not selected.

Usage Examples

Basic Tab Selection

Check Tab Label

Verify Selected Tab

Switch Between Tabs

Use Static Factory Methods