Current Date Utility Function:
------------------------------
public class DateUtility{
static public void selectCurDate(String xpath) throws InterruptedException {
List<WebElement> dates = getDriver().findElements(By.xpath(xpath));
Date date = new Date();
String curDate = date.getDate()+"";
for(WebElement ele : dates){
String dateTxt = ele.getText();
if (curDate.equalsIgnoreCase(dateTxt)) {
ele.click();
break;
}
}
}
}
This comment has been removed by the author.
ReplyDeleteExcellent post on selenium ramesh
ReplyDeleteManual Testing Training in Chennai
QTP Training in Chennai
Selenium Training in Chennai
SoapUI Training in Chennai
Software Testing Training in Chennai