Selenium Interview Questions and Answers
An open-source and free to use automation test tool, Selenium is used to test web applications. Developers use this tool to run test cases directly in web browsers. Selenium supports most of the popular web browsers, including IE, Chrome, Firefox, Safari, and Opera. Developers are free to use programming languages such as Java, Javascript, Python, and PHP to write a test case in Selenium and then running the script to verify test cases in most of the popular web browsers. We have added an interview -specific information to our Selenium Interview Questions. Do not forget to read them!
Developers can run automation test scripts in Windows, Linux an Mac, and can be deployed on Android, iOS and Windows. Selenium is recognized as the most portable, open-source test tool for web application automation. You can now read our updated and huge collection of Selenium Interview Questions.
Most Frequently Asked Selenium Interview Questions
- It is free and open source
- Has large user base and online communities
- Cross-browser compatibility
- Platform compatibility
- Supports most of the programming languages
The Selenium suite includes 4 set of tools:
1. Selenium Integrated Development Environment (IDE): It is a record and playback tool, which is distributed as a Firefox Plugin.
2. Selenium Remote Control (RC): It is a server that allows users to create test scripts in the programming language of their choice. It also allows developers to execute test scripts cross browsers.
3. Selenium WebDriver: This tool communicates directly with the browser and uses native compatibility to automate.
4. Selenium Grid: It is used to distribute test execution on multiple platforms and environments
Selenium supports two types of testing - Functional Testing and Regression Testing.
It is the easiest and simplest tool in the Selenium Package. Two features - record and playback - make this tool very easy to learn with minimum knowledge of other programming languages. Selenium IDE is the best tool for new users.
It is the language for writing test scripts in Selenium IDE.
The locator is an address that identifies a web element within the page. Different types of locators are used to identify different web elements accurately in Selenium:
- ID
- ClassName
- Name
- TagName
- LinkText
- PartialLinkText
- Xpath
- CSS Selector
- DOM
S.no | Assert command | Verify command |
---|---|---|
1. | Sees if a given condition is true or false. | Sees if the condition is true or false |
2. | If the condition is true, program control will execute the next test step. | Irrespective the conditions are true or false; the program does not stop. |
3. | If the condition is not true, execution will stop, and no test will be executed. | All of the test steps get executed. |
XPath can help the developers locate web elements based on their XML path. The logic behind establishing HTML elements using XPath is the crossing between different parts across the page, which enables a user to find the item through the reference to another aspect.
If you are preparing for Selenium interviews, you can have a look at our Advanced Selenium Interview Questions for better insight.
Selenium IDE | Selenium RC | WebDriver |
---|---|---|
Only supports Firefox | Supports a range of browsers like Firefox, Chrome, IE, and Opera | Supports Firefox, Chrome, IE, Opera, and HtmlUnitDriver. |
Supports playback and record features | Does not support record and playback | Does not support record and playback |
Does not require server before executing test scripts | Needs server before executing test scripts | Does not require server before executing test scripts |
Javascript-based framework | JavaScript-based framework | Uses browser's native compatibility for automation |
Not object-oriented | Semi object-oriented | Completely object-oriented |
You are expected to know this information during Selenium Interview Questions With Answers.
Selenium Grid is used for executing test scripts on multiple platforms and cross-browsers simultaneously to achieve distributed test execution under different environments, thus saving program execution time.
Development History
Selenium is a collection of different test tools, and therefore different developers played a role in its development. But primarily, Selenium is the brainchild of Jason Huggins who built it in 2004. With a goal to avoid repetitious manual testing of a web application, Huggins created a JavaScript program to control the browser's actions. This program was called JavaScriptTestRunner, which later became Selenium Core. This information can be asked during Basic Selenium Interview Questions.
Latest Version
The latest version of Selenium available is 3.14, which was released in August 2018.