Class DateTimePickerElement
java.lang.Object
com.vaadin.testbench.TestBenchElement
com.vaadin.flow.component.datetimepicker.testbench.DateTimePickerElement
- All Implemented Interfaces:
CanCompareScreenshots
,HasCallFunction
,HasDriver
,HasElementQuery
,HasHelper
,HasLabel
,HasPropertySettersGetters
,HasSearchContext
,HasTestBenchCommandExecutor
,org.openqa.selenium.SearchContext
,org.openqa.selenium.TakesScreenshot
,org.openqa.selenium.WebElement
,org.openqa.selenium.WrapsElement
A TestBench element representing a
<vaadin-date-time-picker>
element.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the value of the date time picker.getDate()
Gets the selected dateGets the visible presentation value from the inner DatePicker as a string.Gets the selected date timeGets the slotted helper component for the element.getTime()
Gets the selected timeGets the visible presentation value from the inner TimePicker as a string.boolean
When auto open is enabled, the dropdown will open when the field is clicked.void
Selects the given date.void
setDateTime
(LocalDateTime dateTime) Selects the given date time.void
Selects the given time.Methods inherited from class com.vaadin.testbench.TestBenchElement
callFunction, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDomAttribute, getDomProperty, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.testbench.HasElementQuery
$, $
Methods inherited from interface com.vaadin.testbench.HasHelper
getHelperText
Methods inherited from interface com.vaadin.testbench.HasPropertySettersGetters
getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, setProperty, setProperty, setProperty, setProperty
Methods inherited from interface com.vaadin.testbench.HasSearchContext
getContext
Methods inherited from interface org.openqa.selenium.TakesScreenshot
getScreenshotAs
Methods inherited from interface org.openqa.selenium.WebElement
click, findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submit
-
Constructor Details
-
DateTimePickerElement
public DateTimePickerElement()
-
-
Method Details
-
clear
public void clear()Clears the value of the date time picker.- Specified by:
clear
in interfaceorg.openqa.selenium.WebElement
- Overrides:
clear
in classTestBenchElement
-
setDateTime
Selects the given date time.- Parameters:
dateTime
- the date time to set
-
getDateTime
Gets the selected date time- Returns:
- the selected date time or
null
if no date time is selected
-
setDate
Selects the given date.- Parameters:
date
- the date to set
-
getDate
Gets the selected date- Returns:
- the selected date or
null
if no date is selected
-
setTime
Selects the given time.- Parameters:
time
- the time to set
-
getTime
Gets the selected time- Returns:
- the selected time or
null
if no time is selected
-
getDatePresentation
Gets the visible presentation value from the inner DatePicker as a string. This value depends on the used Locale.- Returns:
- the presentation value of the inner date picker
-
getTimePresentation
Gets the visible presentation value from the inner TimePicker as a string. This value depends on the used Locale.- Returns:
- the presentation value of the inner time picker
-
isAutoOpen
public boolean isAutoOpen()When auto open is enabled, the dropdown will open when the field is clicked.- Returns:
true
if auto open is enabled.false
otherwise. Default istrue
-
getHelperComponent
Gets the slotted helper component for the element.- Specified by:
getHelperComponent
in interfaceHasHelper
- Returns:
- the slotted component or
null
if there is no component
-