ComboBoxElement
Playwright element wrapper for<vaadin-combo-box>. Provides helpers to open the overlay, filter items, and pick items by visible text, along with aria/placeholder/validation mixins.
Component Tag
vaadin-combo-box
Implements
FocusableElementHasAriaLabelElementHasInputFieldElementHasPrefixElementHasThemeElementHasPlaceholderElementHasEnabledElementHasTooltipElementHasValidationPropertiesElementHasClearButtonElementHasAllowedCharPatternElement
Factory Methods
getByLabel (Page)
ComboBoxElement by its label. Uses ARIA role COMBOBOX.
Page
required
The Playwright page
String
required
The accessible label of the field
ComboBoxElement
getByLabel (Locator)
ComboBoxElement by its label within a given scope.
Locator
required
The locator to search within
String
required
The accessible label of the field
ComboBoxElement
Constructor
ComboBoxElement
ComboBoxElement.
Locator
required
The locator for the
<vaadin-combo-box> elementMethods
selectItem
String
required
Label of the item to select
filterAndSelectItem
String
required
Text to type for filtering
String
required
Label of the item to select
setFilter
pressSequentially to fire keyboard events that the ComboBox listens to for filtering.
String
required
The filter text
getFilter
open
close
isOpened
true when the overlay is open
assertOpened
assertClosed
getValue
value property, so this reads the displayed text from the input element instead.
Returns: The displayed value or empty string when nothing is selected
assertValue
String
Expected label or empty string for no selection
isReadOnly
true when read-only
assertReadOnly
assertNotReadOnly
getToggleButtonLocator
clickToggleButton
getOverlayItemCount
assertItemCount
int
required
Expected item count