Calendar / Date Picker

Use native date input to select a date.

How to test
driver.findElement(By.id("element_date")).sendKeys("2026-05-24");
# Python: driver.find_element(By.ID, "element_date").send_keys('2026-05-24')

// Java - Full Test
WebElement dateInput = driver.findElement(By.id("element_date"));
WebElement showButton = driver.findElement(By.id("date_show"));
WebElement clearButton = driver.findElement(By.id("date_clear"));
dateInput.clear();
dateInput.sendKeys("2026-05-24");
assert dateInput.getAttribute("value").equals("2026-05-24");
showButton.click();
WebElement result = driver.findElement(By.id("date_result"));
assert result.getText().contains("2026-05-24");
clearButton.click();
assert dateInput.getAttribute("value").equals("");

# Python - Full Test
date_input = driver.find_element(By.ID, "element_date")
show_button = driver.find_element(By.ID, "date_show")
clear_button = driver.find_element(By.ID, "date_clear")
date_input.clear()
date_input.send_keys("2026-05-24")
assert date_input.get_attribute("value") == "2026-05-24"
show_button.click()
result = driver.find_element(By.ID, "date_result")
assert "2026-05-24" in result.text
clear_button.click()
assert date_input.get_attribute("value") == ""

// Java - Alternative Solution
driver.findElement(By.id("element_date")).sendKeys("2026-05-24");
assert driver.findElement(By.id("element_date")).getAttribute("value").equals("2026-05-24");

# Python - Alternative Solution
driver.find_element(By.ID, "element_date").send_keys("2026-05-24")
assert driver.find_element(By.ID, "element_date").get_attribute("value") == "2026-05-24"


Tester Task
  1. Locate the date input using id element_date.
  2. Clear the date field.
  3. Enter 2026-05-24.
  4. Click the Show date button.
  5. Verify the result displays 2026-05-24.
  6. Click the Clear button and verify the date field is empty.