Select the Date from DatePicker in Selenium WebDriver-Example for While loop



In this example we will discuss how to automate the
Date Picker in Selenium WebDriver.
This example also gives details about
the usage of while loop.As we know for and while loop looks
similar in objective. But while loop, helps to execute the
block only when the condition is true.

Difference between for loop and while loop
The for loop is used when you know how many times to execute the block of statements.
In the case of while loop when you are unsure how many iterations are required to
complete the given expression.

DatePicker
The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Select the date it will display in the input text box.

Real Time DatePicker Example
1. Access the Clear trip website using the following url:
https://www.cleartrip.com/
2. Identify the Input Text box.
3. Provide the Future Date to select the Departs on.

DatePicker.java

DatePicker.java


Selenium WebDriver Program



Test your Knowledge in Java,Selenium,HTML,QTP,CSS by attending Quiz!!!!
Quiz Link

Leave a Reply

Your email address will not be published. Required fields are marked *