I personally feel that every automation engineer should be aware of the basic development hooks of the functionality. Today we are going to discuss handling calendar in Selenium WebDriver. In general, when we are working on automation of any travel site then we require to handle calendar during ...
String date_dd_MM_yyyy[] = (dateTime.split(" ")[0]).split("/"); //get the year difference between current year and year to set in calander int yearDiff = Integer.parseInt(date_dd_MM_yyyy[2])- Calendar.getInstance().get(Calendar.YEAR); midLink.click(); if(yearDiff!=0){ //if...