Skip to main content

Overview

PopoverElement is a Playwright wrapper for <vaadin-popover>. It provides utilities to verify popover state and access popover content. Component tag: vaadin-popover Implements:
  • HasThemeElement
  • HasStyleElement
  • HasAriaLabelElement

Constructors

PopoverElement(Page page)

Create a PopoverElement by resolving the popover with ARIA role dialog.
Page
required
The Playwright page instance

PopoverElement(Locator locator)

Create a PopoverElement from an existing locator.
Locator
required
The Playwright locator for the popover element

Methods

isOpen()

Check whether the popover is open (visible). Returns: boolean - True if the popover is visible

assertOpen()

Assert that the popover is open. Verifies: The element has the opened attribute.

assertClosed()

Assert that the popover is closed (hidden). Verifies: The element is hidden in the DOM.

getContentLocator()

Get the locator for the popover content. Returns: Locator - The popover element itself (content is within the popover)

Static Factory Methods

getByLabel(Page page, String label)

Get a popover by its accessible label.
Page
required
The Playwright page instance
String
required
The accessible label of the popover (uses ARIA role DIALOG)
Returns: PopoverElement - The popover with the specified label

Usage Example

Notes

  • Popovers use ARIA role dialog for accessibility
  • Popovers are typically anchored to a target element
  • Multiple popovers can be open simultaneously depending on configuration
  • Popovers may close automatically on click outside or require explicit closure