Class Calendar
- java.lang.Object
-
- org.primefaces.selenium.AbstractPrimePageFragment
-
- org.primefaces.selenium.component.base.AbstractComponent
-
- org.primefaces.selenium.component.base.AbstractInputComponent
-
- org.primefaces.selenium.component.Calendar
-
- All Implemented Interfaces:
org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsElement
public abstract class Calendar extends AbstractInputComponent
Component wrapper for the PrimeFacesp:calendar.
-
-
Constructor Summary
Constructors Constructor Description Calendar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.WebElementgetInput()The input element reference.longgetTimezoneOffset()LocalDateTimegetValue()LocalDategetValueAsLocalDate()StringgetWidgetDate()Gets the JS date value from the widget.booleanisCloseAjaxified()Is this component AJAX enabled with "close"?booleanisDateSelectAjaxified()Is this component AJAX enabled with "dateSelect"?booleanisViewChangeAjaxified()Is this component AJAX enabled with "viewChange"?StringmillisAsFormattedDate(long millis)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)voidsetValue(LocalDate localDate)voidsetValue(LocalDateTime dateTime)-
Methods inherited from class org.primefaces.selenium.component.base.AbstractInputComponent
clear, copyToClipboard, disable, enable, getAssignedLabel, getAssignedLabelText, isEnabled, isOnchangeAjaxified, pasteFromClipboard, selectAllText
-
Methods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxified
-
Methods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriver
-
-
-
-
Method Detail
-
getInput
public org.openqa.selenium.WebElement getInput()
Description copied from class:AbstractInputComponentThe input element reference.- Overrides:
getInputin classAbstractInputComponent- Returns:
- the
WebElementrepresenting the input.
-
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
-
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)
-
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
-
millisAsFormattedDate
public String millisAsFormattedDate(long millis)
-
getTimezoneOffset
public long getTimezoneOffset()
-
-