20 Frequently Asked Selenium Interview Questions and Answers
1. What is Automation Testing?
Automation testing is the process of testing the software using an automation tool to find the defects. In this process, executing the test scripts and generating the results are performed automatically by automation tools. Some most popular tools to do automation testing are HP QTP/UFT, Selenium WebDriver, etc.,
2. What are the benefits of Automation Testing?
· Saves time and money. Automation testing is faster in execution.
· Reusability of code. Create one time and execute multiple times with less or no maintenance.
· Easy reporting. It generates automatic reports after test execution.
· Easy for compatibility testing. It enables parallel execution in the combination of different OS and browser environments.
· Low-cost maintenance. It is cheaper compared to manual testing in a long run.
· Automated testing is more reliable.
· Automated testing is more powerful and versatile.
· It is mostly used for regression testing. Supports execution of repeated test cases.
· Minimal manual intervention. Test scripts can be run unattended.
· Maximum coverage. It helps to increase the test coverage.
3. What type of tests have you automated?
Our main focus is to automate test cases to do Regression testing, Smoke testing, and Sanity testing. Sometimes based on the project and the test time estimation, we do focus on End to End testing.
4. How many test cases you have automated per day?
It depends on Test case scenario complexity and length. I did automate 2-5 test scenarios per day when the complexity is limited. Sometimes just 1 or fewer test scenarios in a day when the complexity is high.
5. What is a Framework?
A framework defines a set of rules or best practices which we can follow in a systematic way to achieve the desired results. There are different types of automation frameworks and the most common ones are:
• Data Driven Testing Framework
• Keyword Driven Testing Framework
• Hybrid Testing Framework
6. Have you created any Framework?
If you are a beginner: No, I didn’t get a chance to create a framework. I have used the framework which is already available.
If you are an experienced tester: Yes, I have created a framework. Or I have involved in the creation of the framework.
7. Can you explain the Framework which you have used in your Selenium Project?
Here we have clearly explained each component of Framework.
8. Why do you prefer Selenium Automation Tool?
· Free and open source
· Have large user base and helping communities
· Cross browser compatibility
· Platform compatibility
· Multiple programming languages support
9. What is Selenium?
Selenium is an open source (free) automated testing suite to test web applications. It supports different platforms and browsers. It has gained a lot of popularity in terms of web-based automated testing and giving a great competition to the famous commercial tool HP QTP (Quick Test Professional) AKA HP UFT (Unified Functional Testing).
Selenium is a set of different software tools. Each tool has a different approach in supporting web based automation testing.
It has four components namely,
i Selenium IDE (Integrated Development Environment)
ii Selenium RC (Remote Control) – selenium 1
iii Selenium WebDriver – selenium 2 & 3
iv Selenium Grid
10. What is Selenium IDE?
Selenium IDE (Integrated Development Environment) is a Firefox plugin. It is the simplest framework in the Selenium Suite. It allows us to record and playback the scripts. Even though we can create scripts using Selenium IDE, we need to use Selenium RC or Selenium WebDriver to write more advanced and robust test cases.
11. What is Selenese?
Selenese is the language which is used to write test scripts in Selenium IDE.
12. Which is the only browser that supports Selenium IDE to be used?
13. What is Selenium RC?
14. What is Selenium WebDriver?
Selenium WebDriver AKA Selenium 2 is a browser automation framework that accepts commands and sends them to a browser. It is implemented through a browser-specific driver. It controls the browser by directly communicating with it. Selenium WebDriver supports Java, C#, PHP, Python, Perl, Ruby.
15. What is Selenium Grid?
Selenium Grid is a tool used together with Selenium RC to run tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems.
In simple words, it is used to distribute your test execution on multiple platforms and environments concurrently.
16. When do you use Selenium Grid?
Selenium Grid can be used to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution
17. What are the advantages of Selenium Grid?
It allows running test cases in parallel thereby saving test execution time.
It allows multi-browser testing
It allows us to execute test cases on multi-platform
18. What is a hub in Selenium Grid?
A hub is a server or a central point that controls the test executions on different machines.
19. What is a node in Selenium Grid?
Node is the machine which is attached to the hub. There can be multiple nodes in Selenium Grid.
20. What are the types of WebDriver APIs available in Selenium?
• Firefox Driver
• Gecko Driver
• InternetExplorer Driver
• Chrome Driver
• HTMLUNIT Driver
• Opera Driver
• Safari Driver
• Android Driver
• iPhone Driver