Calendar now = Calendar.getInstance();
System.out.println("Current Year is : " + now.get(Calendar.YEAR));
//month start from 0 to 11
System.out.println("Current Month is : " + (now.get(Calendar.MONTH) + 1 ));
System.out.println("Current Date is : " + now.get(Calendar.DATE));
now.add(Calendar.DATE, 51);
int dayOfMonth = now.get(Calendar.DAY_OF_MONTH) ;
driver.findElement(By. linkText("" + dayOfMonth)).click();
No comments:
Post a Comment