In Selenium Javascript, sendKeys()
is not working in Date or Time edit boxes. When I use the below code, it didn't populate the values in the appropriate fields. Is there any alternate for sendKeys()
?
String strDate = "10/10/2014" ;
driver.findElement(By.xpath(DateXpath)).sendKeys(strDate);
Even I tried by hard coding the value inside sendKeys()
, like
driver.findElement(By.xpath(DateXpath)).sendKeys("10/10/2014");
but didn't work