-
Notifications
You must be signed in to change notification settings - Fork 108
DatePicker
Taisiia-Kozlova edited this page Nov 7, 2017
·
3 revisions
DatePicker – a type of text-field that only allows date-format input with separator-symbols, depending on the implementation, such as “.” and “/”, etc.
Example:
JDI enables simple ways of interaction with text-fields, such as text input, text removal and cursor focus on chosen field.
Here is the list of available methods.
Method | Description | Return Type |
---|---|---|
input(String) | Input text in textfield | void |
newInput(String) | Clear and input text in textfield | void |
clear() | Clear textfield | void |
focus() | Focus (click) on textfield | void |
DatePicker Initialization:
@FindBy(xpath = "//date-picker xpath")
public DatePicker datePicker;
Action > Examples:
@Test
public void clearDatePickerExample() {
Assert.assertTrue(!datePicker.getText().equals("")
datePicker.clear();
}