com.vaadin.flow.component.datepicker.testbench.
Class DatePickerElement
- java.lang.Object
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.flow.component.datepicker.testbench.DatePickerElement
-
All Implemented Interfaces:
HasLabel, CanCompareScreenshots, HasCallFunction, HasDriver, HasElementQuery, HasPropertySettersGetters, HasSearchContext, HasTestBenchCommandExecutor, org.openqa.selenium.internal.WrapsElement, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement
public class DatePickerElement extends TestBenchElement implements HasLabel
A TestBench element representing a
<vaadin-date-picker>
element.
-
-
Constructor Summary
Constructors Constructor and Description DatePickerElement()
-
Method Summary
All Methods Modifier and Type Method and Description void
clear()
Clears the value of the date picker.
LocalDate
getDate()
Gets the selected date
protected String
getValue()
Gets the selected date as a string.
void
setDate(LocalDate date)
Selects the given date.
protected void
setValue(String value)
Sets the selected date as a string.
-
Methods inherited from class com.vaadin.testbench.TestBenchElement
callFunction, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isIE, 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.HasPropertySettersGetters
getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, setProperty, setProperty, setProperty, setProperty
-
Methods inherited from interface org.openqa.selenium.WebElement
click, findElement, findElements, getAttribute, getCssValue, getLocation, getRect, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submit
-
Methods inherited from interface com.vaadin.testbench.HasElementQuery
$, $
-
-
-
-
Method Detail
-
clear
public void clear()
Clears the value of the date picker.
Specified by:
clear
in interfaceorg.openqa.selenium.WebElement
Overrides:
clear
in classTestBenchElement
-
setDate
public void setDate(LocalDate date)
Selects the given date.
Parameters:
date
- the date to set
-
getDate
public LocalDate getDate()
Gets the selected date
Returns:
the selected date or
null
if no date is selected
-
setValue
protected void setValue(String value)
Sets the selected date as a string.
The value is always in format
YYYY-MM-DD
.Parameters:
value
- the value to set
-
getValue
protected String getValue()
Gets the selected date as a string.
The value is always in format
YYYY-MM-DD
.Returns:
the value of the date picker or an empty string if no date is selected
-
-