Skip to main content

AccordionPanelElement

Playwright element wrapper for <vaadin-accordion-panel> offering utilities to toggle open state, read summary, and access content.

Component Tag

vaadin-accordion-panel
  • vaadin-accordion-heading - Panel heading/summary element

Constructor

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

Static Factory Methods

getAccordionPanelBySummary

Get an accordion panel by its summary text within a scope.
Locator
Scope to search within (typically the accordion element)
String
Panel summary heading text

getOpenedAccordionPanel

Get the currently opened accordion panel within a scope.
Locator
Scope to search within (typically the accordion element)

Methods

isOpen

Whether the panel is open.

setOpen

Set the open state by clicking the summary when needed.
boolean
Desired open state

getSummaryLocator

Locator pointing to the summary heading (vaadin-accordion-heading).

getSummaryText

Text content of the summary heading.

getContentLocator

Locator pointing to the first non-slotted content element.

Assertion Methods

assertOpened

Assert that the panel is opened.

assertClosed

Assert that the panel is closed.

assertContentVisible

Assert that the content area is visible.

assertContentNotVisible

Assert that the content area is not visible.

assertEnabled

Assert that the panel is enabled.

assertDisabled

Assert that the panel is disabled.

Usage Examples

Basic Panel Operations

Toggle Panel State

Check Summary Text

Access Panel Content

Work with Disabled Panel

Use Static Factory Methods