vendredi 2 janvier 2015

selenium code for date picker


Vote count:

0




yatra.com website for which i am not able to locate the xpath, however i have used readonly attribute, but i want the date should be selected from the datepicker. here is my code.


WebElement dateWidget = driver.findElement(By.xpath("//[@id='BE_flight_depart_date']")); dateWidget.click(); List columns=dateWidget.findElements(By.xpath("//[@id='calmain']"));



//comparing the text of cell with today's date and clicking it.
for (WebElement cell : columns)
{
if (cell.getText().equals(today))
{
cell.click();
break;
}
}


asked 14 secs ago







selenium code for date picker

Aucun commentaire:

Enregistrer un commentaire