I am newbie to Selenium webdriver
. I am using Java
programming language.
My problem is i am not able to call calendar element and select the date inside it.
Here is the link:
https://www.veltra.com/en/asia/malaysia/kuala_lumpur/a/139387
Any help is much appreciated.
List<WebElement> allDates=driver.findElements(By.xpath("//table[@class='ui-datepicker-calendar']//td"));
for(WebElement selectDate:allDates)
{
String date=selectDate.getText();
if(date.equalsIgnoreCase("31"))
{
selectDate.click();
break;
}
}
What I planned is, after I click "Book Now" button, I want to select 31st July
in the calendar. The date will then display in the text box.