How To Handle Calendar Pop Up In Selenium WebDriver

Calendar Pop Up is a type of Hidden Division Pop up. Since this pop up is a part of html page we can use findElements() method and handle it.

In the web page sometimes you’ll fail to inspect a particular element, in that time, go to firebug window in the firebug toolbar and select the firbug search symbol.

Here is my list of best books to learn Selenium.

Here is an example which shows how to handle calendar pop up :

1) Launch Eclipse, create a project, a package, and a class under named “”.

Download this application-Download

2) Navigate to site “”. For this you need to add the following lines of code in your script :
WebDriver driver=new FirefoxDriver();


3) Right click on the calendar option given for Departure and inspect it. Chose the date of departure as 3rd March. To do this much you need to include the following lines of code in your script :



4) Now again click on the Departure Calendar and click on the Cross button(X) to close the calendar. For this, first locate the calendar and then click on it.


Here is my list of best books to learn Selenium.


This is all about calendar pop up. Handling Calendar pop up is not complex. All you have to do is locate the element and locate it correctly, then perform action…!!!

Download this application-Download

Add Comment