Class DateTimeFieldElement

  • All Implemented Interfaces:
    com.vaadin.testbench.commands.CanCompareScreenshots, com.vaadin.testbench.commands.CanWaitForVaadin, com.vaadin.testbench.commands.TestBenchElementCommands, com.vaadin.testbench.HasDriver, com.vaadin.testbench.HasSearchContext, com.vaadin.testbench.HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

    public class DateTimeFieldElement
    extends AbstractDateFieldElement
    Element class for testing DateTimeField.
    • Constructor Detail

      • DateTimeFieldElement

        public DateTimeFieldElement()
    • Method Detail

      • getValue

        public String getValue()
        Return value of the date field element.
        Returns:
        value of the date field element
      • openPopup

        public void openPopup()
        Opens the date field popup.
      • setDateTime

        public void setDateTime​(LocalDateTime value)
        Sets the value to the given date and time.
        Parameters:
        value - the date and time to set.
      • getDateTime

        public LocalDateTime getDateTime()
        Gets the value as a LocalDateTime object.
        Returns:
        the current value as a date object, or null if a date is not set or if the text field contains an invalid date
      • getISOFormatter

        protected DateTimeFormatter getISOFormatter()
        Gets a date and time formatter for ISO-8601.
        Returns:
        a date and time formatter for ISO-8601
        Since:
        8.1.0