Selenium Interview Questions and Answers
Selenium Interview Questions and Answers
7) Selenium IDE Interview Questions
8) Selenium Grid Interview Questions
11) Selenium Automation Framework Questions
I) Selenium Fundamentals
1) What is Selenium?
• Selenium is a Suite of Software tools to automate Web browsers.
(Selenium automates Web Applications only, doesn’t automate Desktop Applications).
• Selenium Supports various Operating environments.
(MS Windows, Linux, Macintosh etc…)
• Selenium suite of Tools mainly used for Functional and Regression Testing.
2) What are the Tools or Components of Selenium?
i) Selenium IDE (Integrated Development Environment)
ii) Selenium RC (Remote Control)
iii) Selenium WebDriver
iv) Selenium Grid
3) What is Selenium IDE?
Selenium IDE is an integrated development environment to create and execute Selenium Test cases. It is a Firefox extension, and allows us to record, edit, and debug test cases.
4) What is Selenium RC? (* outdated Tool)
5) What is Selenium WebDriver? (Important tool in Selenium suite)
• WebDriver is used to create Test cases that run on various browsers, using element locators and WebDriver API commands we can create Test cases.
• We can enhance Test cases using Programming features and Testing Framework Annotations.
• WebDriver was designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API.
• Selenium-WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded.
6) What is Selenium Grid?
Selenium-Grid support distributed test execution, It allows us run our 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.
7) What is TestNG and usage of TestNG in Selenium?
TestNG is a Testing Framework similar to JUnit or NUnit used to group Test cases, run Test batches, parameterizing Tests, and its provide detailed html Test reports.
8) What is Maven and usage of Maven in Selenium?
• Apache Maven is Java project management and build management tool, we can manage Java project builds very easily using maven.
• As Maven Is build management tool, It will helps us to manage our Selenium project’s build easily. Maven manages our Selenium test project’s build compilation, documentation and other related project tasks It self. It will helps us to create right project structure, add and manage jar files In project’s build path etc..
9) What are the Advantages of Selenium?
• Open Source Software
• Supports various Programming Languages to write Test Scripts
• Supports various Browsers to create and execute Test Cases/Test Scripts.
• Supports various Operating environments to conduct Testing.
• Supports Parallel Test execution.
10) What are the Disadvantages of Selenium?
• No reliable Technical support
• Supports Web based / Browser based Applications only
• No built-in Result Reporting facility.
• New features may not work properly.
II) Selenium Test Process / Selenium Test Life Cycle
1) What are the important phases of Selenium Test Process?
i) Test Planning
ii) Generate Basic Tests
iii) Enhance Tests
iv) Running & Debugging Tests
v) Reporting and Tracking Defects
2) What are the important tasks in Test Planning phase?
• Select Test Cases for Automation
• Choose Selenium Tools and others for Test Automation
• Configure Selenium
• Design and implement Framework
3) How to create Test cases in Selenium?
Using Element Locators and Selenese Commands create Test Cases.
Using Element Locators and WebDriver API commands create Test cases.
4) How to enhance Test Cases in Selenium WebDriver?
Using Programming (either Java or Python or Ruby or PHP or Perl or C#) and Testing framework Annotations (either JUnit or TestNG etc…) we can enhance Test Cases.
5) What is Enhancing Test Cases?
Inserting Verification points, Parameterization, Synchronization, Error Handling, Adding Comments etc… with respect to Test Requirements.
6) How to Parameterize Selenium IDE Test Cases?
Selenium IDE doesn’t support Parameterization/Data driven Testing.
7) How to Parameterize Selenium WebDriver Test Cases?
Using programming features (Ex: Java) and Testing Framework (Ex: TestNG) Annotations we can Parameterize Selenium WebDriver Test cases.
8) How to conduct Cross Browser Testing with Selenium IDE?
Selenium IDE doesn’t support Cross browser Testing, it supports Mozilla Firefox Browser only.
9) How to maintain Objects/Elements in a centralized location?
In Selenium WebDriver using POM (Page Object Model) we can maintain Objects/Elements in a centralized location.
10) How to conduct Database Testing with Selenium WebDriver?
With the help of programming features we can connect to any Database Management System (Ex: Oracle, MS SQL Server, MySQL etc…) and conduct Database Testing.
11) How to create Test cases using Selenium Grid?
Selenium Grid doesn’t support Creating Test Cases, it supports Test execution only (Parallel Testing), we can execute Selenium RC and Selenium WebDriver Test Cases using Selenium Grid).