Class DatePicker
java.lang.Object
org.primefaces.selenium.AbstractPrimePageFragment
org.primefaces.selenium.component.base.AbstractComponent
org.primefaces.selenium.component.base.AbstractInputComponent
org.primefaces.selenium.component.DatePicker
- All Implemented Interfaces:
org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
Component wrapper for the PrimeFaces
p:datePicker.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclick()org.openqa.selenium.WebElementGets the Clear button on the overlay panel.org.openqa.selenium.WebElementgetInput()The input element reference.org.openqa.selenium.WebElementGets the Next Month link in the navigator.org.openqa.selenium.WebElementgetPanel()org.openqa.selenium.WebElementGets the Previous Month link in the navigator.longGets the browser time zone offset.org.openqa.selenium.WebElementGets the Today button on the overlay panel.getValue()Gets the JS date value from the widget.booleanhasDate()Checks whether a date is selectedvoidHides the overlay panel.booleanIs this component AJAX enabled with "close"?booleanIs this component AJAX enabled with "dateSelect"?booleanisLazy()Is this a lazy datepicker.booleanIs this component AJAX enabled with "viewChange"?millisAsFormattedDate(long millis) org.openqa.selenium.WebElementSelects a day in the overlay panel.voidselectMonthDropdown(int month) Select a month from the drodown.voidselectYearDropdown(int year) Select a year from the drodown.voidsetDate(long epoch) Widget API call to set date to this epoch in millis.voidsetDate(LocalDateTime dateTime) Widget API call to set date to this LocalDateTime.voidsetValue(long millis) voidvoidsetValue(LocalDateTime dateTime) org.openqa.selenium.WebElementShows the overlay panel.voidOpen the month select dropdown.voidOpen the year select dropdown.voidupdateViewDate(long epoch) Widget API call to update the overlay popup to this epoch in millis.Methods inherited from class org.primefaces.selenium.component.base.AbstractInputComponent
clear, copyToClipboard, disable, enable, getAssignedLabel, getAssignedLabelText, isEnabled, isOnchangeAjaxified, pasteFromClipboard, selectAllTextMethods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxifiedMethods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.TakesScreenshot
getScreenshotAsMethods inherited from interface org.openqa.selenium.WebElement
findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isSelected, sendKeys, submit
-
Constructor Details
-
DatePicker
public DatePicker()
-
-
Method Details
-
click
public void click() -
getInput
public org.openqa.selenium.WebElement getInput()Description copied from class:AbstractInputComponentThe input element reference.- Overrides:
getInputin classAbstractInputComponent- Returns:
- the
WebElementrepresenting 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
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
-
getValueAsLocalDate
-
setValue
-
setValue
-
setValue
public void setValue(long millis) -
millisAsFormattedDate
-
setDate
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
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
-