Skip to main content

DetailsElement

Playwright element wrapper for <vaadin-details> providing helpers to open/close and access the summary and content areas.

Component Tag

vaadin-details

Implements

  • HasStyleElement - CSS class and style management
  • HasThemeElement - Theme variant support
  • HasTooltipElement - Tooltip text

Constructor

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

Static Factory Methods

getBySummaryText

Get a details component by its summary text.
Page
Playwright page
String
Summary text to match

Methods

isOpen

Whether the details is opened.

setOpen

Set the opened state by clicking the summary when necessary.
boolean
Desired open state

getSummaryLocator

Locator for the summary element.

getSummaryText

Text content of the summary element.

getContentLocator

Locator for the currently visible content container.

Assertion Methods

assertEnabled

Assert that the component is enabled.

assertDisabled

Assert that the component is disabled.

assertOpened

Assert that the details is opened.

assertClosed

Assert that the details is closed.

assertContentVisible

Assert that the content is visible.

assertContentNotVisible

Assert that the content is not visible.

Usage Examples

Toggle Details Open/Close

Check Summary and Content

Work with Disabled Details