DatePickerElement
Playwright element wrapper for<vaadin-date-picker>. Adds convenience methods for LocalDate values and lookup by label.
Component Tag
vaadin-date-picker
Implements
HasInputFieldElementHasValidationPropertiesElementHasClearButtonElementHasPlaceholderElementHasThemeElementFocusableElementHasAriaLabelElementHasEnabledElementHasTooltipElementHasLabelElementHasHelperElement
Factory Methods
getByLabel (Page)
DatePickerElement by its label. Uses ARIA role COMBOBOX.
Page
required
The Playwright page
String
required
The accessible label of the field
DatePickerElement
getByLabel (Locator)
DatePickerElement by its label within a given scope.
Locator
required
The locator to search within
String
required
The accessible label of the field
DatePickerElement
Constructor
DatePickerElement
DatePickerElement.
Locator
required
The locator for the
<vaadin-date-picker> elementMethods
setValue (LocalDate)
LocalDate formatted as ISO-8601.
LocalDate
required
The date to set
setValue (String)
String
required
Value formatted as in the view (dd/mm/yyyy)
getValueAsLocalDate
LocalDate.
Returns: The parsed date or null when empty
assertValue (String)
String
required
Expected value formatted as in the view (dd/mm/yyyy)
assertValue (LocalDate)
LocalDate
Expected
LocalDate or null for empty