Class DatePicker

All Implemented Interfaces:
org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

public abstract class DatePicker extends AbstractInputComponent
Component wrapper for the PrimeFaces p:datePicker.
  • Constructor Details

    • DatePicker

      public DatePicker()
  • Method Details

    • click

      public void click()
    • getInput

      public org.openqa.selenium.WebElement getInput()
      Description copied from class: AbstractInputComponent
      The input element reference.
      Overrides:
      getInput in class AbstractInputComponent
      Returns:
      the WebElement representing the input.
    • getPanel

      public org.openqa.selenium.WebElement getPanel()
    • isDateSelectAjaxified

      public boolean isDateSelectAjaxified()
      Is this component AJAX enabled with "dateSelect"?
      Returns:
      true if AJAX enabled false if not
    • isViewChangeAjaxified

      public boolean isViewChangeAjaxified()
      Is this component AJAX enabled with "viewChange"?
      Returns:
      true if AJAX enabled false if not
    • isCloseAjaxified

      public boolean isCloseAjaxified()
      Is this component AJAX enabled with "close"?
      Returns:
      true if AJAX enabled false if not
    • getNextMonthLink

      public org.openqa.selenium.WebElement getNextMonthLink()
      Gets the Next Month link in the navigator.
      Returns:
      the Next Month link
    • getPreviousMonthLink

      public org.openqa.selenium.WebElement getPreviousMonthLink()
      Gets the Previous Month link in the navigator.
      Returns:
      the Previous Month link
    • selectDay

      public org.openqa.selenium.WebElement selectDay(String day)
      Selects a day in the overlay panel.
      Parameters:
      day - the day to select
      Returns:
      the day selected
    • getClearButton

      public org.openqa.selenium.WebElement getClearButton()
      Gets the Clear button on the overlay panel.
      Returns:
      the Clear button
    • getTodayButton

      public org.openqa.selenium.WebElement getTodayButton()
      Gets the Today button on the overlay panel.
      Returns:
      the Today button
    • getValue

      public LocalDateTime getValue()
    • getValueAsLocalDate

      public LocalDate getValueAsLocalDate()
    • setValue

      public void setValue(LocalDate localDate)
    • setValue

      public void setValue(LocalDateTime dateTime)
    • setValue

      public void setValue(long millis)
    • millisAsFormattedDate

      public String millisAsFormattedDate(long millis)
    • setDate

      public void setDate(LocalDateTime dateTime)
      Widget API call to set date to this LocalDateTime.
      Parameters:
      dateTime - the LocalDateTime to set to
    • setDate

      public void setDate(long epoch)
      Widget API call to set date to this epoch in millis.
      Parameters:
      epoch - epoch in milliseconds
    • getWidgetDate

      public String getWidgetDate()
      Gets the JS date value from the widget.
      Returns:
      the JS date value or null
    • hasDate

      public boolean hasDate()
      Checks whether a date is selected
      Returns:
      true if a date is selected.
    • isLazy

      public boolean isLazy()
      Is this a lazy datepicker.
      Returns:
      true if lazy
    • updateViewDate

      public void updateViewDate(long epoch)
      Widget API call to update the overlay popup to this epoch in millis.
      Parameters:
      epoch - epoch in milliseconds
    • showPanel

      public org.openqa.selenium.WebElement showPanel()
      Shows the overlay panel.
      Returns:
      the panel shown
    • hidePanel

      public void hidePanel()
      Hides the overlay panel.
    • getTimezoneOffset

      public long getTimezoneOffset()
      Gets the browser time zone offset.
      Returns:
      the browser time zone offset in milliseconds
    • toggleMonthDropdown

      public void toggleMonthDropdown()
      Open the month select dropdown.
    • selectMonthDropdown

      public void selectMonthDropdown(int month)
      Select a month from the drodown.
      Parameters:
      month - the month to select
    • toggleYearDropdown

      public void toggleYearDropdown()
      Open the year select dropdown.
    • selectYearDropdown

      public void selectYearDropdown(int year)
      Select a year from the drodown.
      Parameters:
      year - the year to select