Selenium Interview Question – 3

September 23, 2016

This is the third post in the series of Interview Questions. In case you missed first two posts below are the link:

Selenium Interview Question – 1

Selenium Interview Question – 2

This section is mainly focused on Interview Questions from topics like Advance Selenium WebDriver API’s, Design Patterns and Frameworks. Let’s start with the Interview Question now.

Ques1: What type of test cases have you automated?

  • This is one the frequently asked questions if you are going for Interviews in Automation profile. Regression and Functional tests are generally automated using any automation tools because these type of tests are more stable and are less prone to changes.

Ques2: Have you worked on any framework? Describe the framework designed for your project?

  • Here, they want to test that whether you have actually worked on some framework or not. The Answer to this question will be the framework which you have designed in your project. If you have not worked on any framework. Please go through Selenium Tutorials to understand some standard frameworks designed with Selenium Automation Tool.

Ques3: Explain the directory structure of your project?

  • Here, the interviewer is expecting to know what kind of directory structure and class structure you are following in your project. While explaining the answer to this question mention the reason for having the directory structure you are following. Explain the different OPPs concept, design pattern of classes, configuration files(if any) you are following in your project. If you have not worked on any project, refer Hybrid Framework tutorial.

Ques4: How are you handling logging in your project?

  • Logging is one of the essential features of any framework (project). For logging feature, there are many third party tools available, one of them is log4j.jar file. It supports logs at various levels – INFO, ERROR, DEBUG, EXCEPTION, etc.

Ques5: Which design patterns do you use?

  • Most frequently used design patterns is POM (Page Object Model). In this type of design pattern, one class file is created for each page of the application under test. In each class, first, an object repository is created which will have all the WebElements of the respective page then in the constructor, all these WebElements are initialised.
  • After that, all the possible scenarios are created as methods in that class.

Ques6: Explain different exception in Selenium WebDriver?

To answer this question, please follow link.

Ques7: What approach will you follow to pick a date from Date Picker?

In most of the calendars which use date picker, month and year are generally in form of a dropdown and the dates are in some table. Sometimes directly using xpath works and sometimes you have to iterate over this table to select a date from the calendar.

Ques8: Have you integrated AutoIt tool in your project? Why is this tool used?

  • AutoIT is a tool which is used to automate windows based application. In some scenarios like downloading and uploading an image, there is a requirement to integrate something which can interact with windows based application. For a better understanding follow this link –

Ques9: Have you heard of Continuous Integration, Continuous Deployment, and Continuous Delivery?  Which tool are you using for same?

  • In continuous Integration, you have an application that on every code commit build is created automatically, Unit tests are run, and application is deployed in the test-like environment.
  • Continuous delivery is to do automation and Integration testing on every build to catch early issues in the build.
  • Continuous Deployment extends continuous delivery, after completion of automated testing the code is deployed to the production.
  • To learn it in detail, follow Continuous Delivery Article

Ques10: Write a code to read properties file using JAVA?

Ques11: Have you used Excel Sheet in your project? What are you using for the same?

  • POI apache jar file is used to read from an excel sheet. There are many other open sources and paid tools available in the market like JXL, but POI from apache is most widely used.
  • In Working with Excel article, I have covered all possible methods which you need to work with an excel sheet.

Ques12: What are the challenges you faced while working with Selenium Automation Tool?


  • One of the biggest challenges faced while working with Selenium is Synchronization.
  • An application under test has its own performance speed whereas the code written with selenium has its own.
  • Keeping both in sync is a big task.
  • Selenium provides us some wait statements (Page load Timeout, Implicit wait, Explicit wait and Fluent wait) which help us to improve synchronization.
  • To learn Wait commands in detail follow:


  • Another challenge which generally an automation engineer face is Maintaining the code.
  • If your application is more prone to change like html elements of the page changes, some new components are being added and so on, this may affect your code especially locators.
  • To get rid of these situations we have certain design patterns like POM (Page Object Model), Page Factory.

Ques13: Have you ever worked with Sikuili? How does it work?

  • Selenium can only automate the Web-based application, but sometimes you may require interacting with Windows based applications as well. In a such a scenario we have to use some third party tool like Sikuli, which is an open source tool. This tool works with image recognization mechanism. It interacts with web elements through images.

Ques14: If you have ten elements on a page, and you have defined implicit wait as 10 sec. How much minimum and maximum time will your script take to interact with all the Web Elements?

  • Minimum time will be almost zero seconds – if all these 10 web elements are already available, then selenium will interact with all of them in no time.
  • Maximum time will be (10 * 10 = 100) seconds – if each element appears on the page at the 10th second, then the max time will be 100 seconds (10 sec for each web element).

Ques15: What are different ways to find dynamic web elements (let us say these web elements does not have any Id or classname) on a page?

  • In such a scenario, we will take help of XPaths. There are many functions in Xpath like text(), starts-with(), contains() and certain axes like parent, child, siblings, preceding etc. They can be used
  • Another way is to search for a web element which is stable and unique and then relative to that certain axes like parent, child, siblings, preceding etc can be used to reach to a particular web element.

Quest16: Can you perform Mobile Automation Testing using Selenium?

  • Yes, there is a tool called Appium, a wrapper written over Selenium which can be used to automate Mobile applications.

Ques17: What is Selenium Grid used for?

  • Selenium Grid is the fourth component of Selenium suite and it is used for parallel testing or distributive testing on the same system or on different systems.
  • To learn Selenium Grid in detail follow – Working with Selenium Grid.

Ques18: What is POM (Page Object Model)? Is it some framework? What is it used for?

  • POM stands for Page object model, it’s not a framework but a design pattern. To learn page object model follow – POM in Selenium Frameworks.

Ques19: What benefit you get by using Page Factory?


Ques20: Have you heard of Robot class? Can you explain a scenario where robot class can be used?

Another way to interact with windows based application is Robot class. You might have performed some operation like right clicking on some web element which pops out a menu (which is a windows based popup). To interact with such a menu bar, robot class can be used.


Stay tuned to this place for more updates on Interview Questions.

PS: For any questions, queries or comments feel free to write us at or Happy Learning 🙂


About the Author


Follow Saurabh:

Leave a Comment: