Skip to main content

AccordionElement

Playwright element wrapper for <vaadin-accordion> providing helpers to access panels by summary text and assert open/closed state.

Component Tag

vaadin-accordion

Implements

  • HasStyleElement - CSS class and style management

Constructor

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

Methods

getPanel

Get a panel by its summary text.
String
Panel summary text
Returns an AccordionPanelElement for the matching panel.

openPanel

Open a panel by its summary text.
String
Panel summary text

closePanel

Close a panel by its summary text.
String
Panel summary text

isPanelOpened

Whether the panel with the given summary is open.
String
Panel summary text

getOpenedPanel

Get the currently opened panel.
Returns the AccordionPanelElement that is currently open.

Assertion Methods

assertPanelCount

Assert the number of panels present in the accordion.
int
Expected panel count

assertPanelOpened

Assert that the panel with the given summary is open.
String
Panel summary text

assertPanelClosed

Assert that the panel with the given summary is closed.
String
Panel summary text

Usage Examples

Basic Accordion Operations

Open/Close Panels

Work with Disabled Panels

Get Currently Opened Panel

Access Panel Content