com.vaadin.flow.component.datepicker.testbench.

Class DatePickerElement

    • Constructor Detail

      • DatePickerElement

        public DatePickerElement()
    • Method Detail

      • clear

        public void clear()

        Clears the value of the date picker.

        Specified by:

        clear in interface org.openqa.selenium.WebElement

        Overrides:

        clear in class TestBenchElement

      • setDate

        public void setDate(LocalDate date)

        Selects the given date.

        Parameters:

        date - the date to set

      • getDate

        public LocalDate getDate()

        Gets the selected date

        Returns:

        the selected date or null if no date is selected

      • setValue

        protected void setValue(String value)

        Sets the selected date as a string.

        The value is always in format YYYY-MM-DD.

        Parameters:

        value - the value to set

      • getValue

        protected String getValue()

        Gets the selected date as a string.

        The value is always in format YYYY-MM-DD.

        Returns:

        the value of the date picker or an empty string if no date is selected