Selenium WebDriver Java Maven input date with sendkeys isn't working -
i'm trying input date date field has calendar plugin every reservation site has. here's code:
webelement checkin = driver.findelement(by.id("check-in")); checkin.sendkeys("08/31/15"); webelement checkout = driver.findelement(by.id("check-out")); checkout.sendkeys("09/06/15");
this isn't inputting date when run script. date format correct. doing wrong? how fix this?
one thing might want try run javascript snippet through webdriver
instance change input's value. this:
((javascriptexecutor) driver).executescript("$('#check-in').prop('value', '08/31/15');");
Comments
Post a Comment