How to handle calendar or date picker using dynamic XPATH?
Most of the times selecting a particular date from a date picker is a tedious job. We can easily automate this scenario with the help of dynamic XPATH. AUT : https://www.spicejet.com/ Test Steps : Navigate to https://www.spicejet.com/ Enter Departure City Enter Arrival City Click on "Depart Date" date picker and select an appropriate date of departure Click on 'Flights' icon to view the available flights Test Script : package seleniumwebdriverbestpractices; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class HandleCalendarUsingDynamicXPATH { static WebDriver driver; public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub System.setProperty("webdriver....