public class DatePickerElement
extends com.vaadin.testbench.TestBenchElement
implements com.vaadin.testbench.HasLabel, com.vaadin.testbench.HasHelper
<vaadin-date-picker>
element.| Modifier and Type | Class and Description |
|---|---|
static class |
DatePickerElement.MonthCalendarElement |
static class |
DatePickerElement.OverlayContentElement |
static class |
DatePickerElement.WeekdayElement |
| Constructor and Description |
|---|
DatePickerElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the value of the date picker.
|
void |
close()
Closes the date picker overlay
|
LocalDate |
getDate()
Gets the selected date
|
String |
getInputValue()
Gets the visible presentation value from the inner input element as a
string.
|
DatePickerElement.OverlayContentElement |
getOverlayContent()
Gets the content of the first date picker overlay on the page Should only
be used with a single date picker at a time, there is no check that the
overlay belongs to this specific date picker
|
protected String |
getValue()
Gets the selected date as a string.
|
boolean |
isAutoOpen()
When auto open is enabled, the dropdown will open when the field is
clicked.
|
void |
open()
Opens the date picker overlay
|
void |
setDate(LocalDate date)
Selects the given date.
|
void |
setInputValue(String value)
Simulates the user selecting a date via the input element.
|
protected void |
setValue(String value)
Sets the selected date as a string.
|
callFunction, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isIE, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElementsclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, setProperty, setProperty, setProperty, setPropertypublic void clear()
clear in interface org.openqa.selenium.WebElementclear in class com.vaadin.testbench.TestBenchElementpublic void setDate(LocalDate date)
date - the date to setpublic LocalDate getDate()
null if no date is selectedprotected void setValue(String value)
The value is always in format YYYY-MM-DD.
value - the value to setprotected String getValue()
The value is always in format YYYY-MM-DD.
public void setInputValue(String value)
Enter to commit the new
date.value - the date string to enter.public String getInputValue()
public boolean isAutoOpen()
true if auto open is enabled. false otherwise.
Default is truepublic void open()
public void close()
public DatePickerElement.OverlayContentElement getOverlayContent()
Copyright © 2026. All rights reserved.