본문 바로가기

카테고리 없음

Education

10 Important Selenium Interview Questions

1. What is Automation Testing?

The use of automation tools for writing and executing the test cases with no manual involvement for executing the Automated Test Suite is called Automation Testing. The Automation tools are preferred by Testers to write the test cases or test scripts and then group them all into Test Suites. These tools are designed to execute manually designed test cases without any human intervention. 

 

2. What are the advantages/benefits of Automation Testing?

This is one of the common interview questions. Some of the advantages of Automation Testing include:

  • Save Money and Time. 
  • Automation Testing increases the accuracy as there is no chance for human errors.
  • Code Reusability. Create once and execute multiple times with Less or no maintenance.
  • Easy Reporting. Automatically generates the reports after the execution of the test cases.
  • Easy for Compatibility Testing by enabling the parallel execution in combination with OS and browser environments.
  • More Reliable, Powerful, and Versatile.
  • Automation Tools allows us to integrate with Jenkins, GitHub, etc.,
  • Mostly used for Regression Testing.
  • Helps to monitor the Test Coverage and increase the test cases accordingly.

3. How many Test cases have you automated per day?

This is one of the tricky Selenium interview questions. Actually, it depends on the complexity and length of the Test case scenario. When the complexity is limited, you can automate two to five test cases and one or fewer test cases when the complexity is high in a day.

4. What is Selenium?

Selenium is one of the most popular automated Testing Suite. It’s a playback tool to perform functional testing without any knowledge of a test scripting language. Selenium is the open-source, web UI-based automation testing suite. Jason Huggins developed this tool in 2004 at ThoughtWorks. 

5. What are the different Selenium suite Components?

Selenium is not just a single tool or utility, rather a package of several testing tools and that’s why it’s called Selenium Suite. Each of these tools caters to different testing and testing environments.

It comprises four major components as follows.

 

Selenium Integrated Development Environment (IDE):

It is distributed as a Firefox plugin that acts as a record and playback tool. It is developed to speed up the creation of automation scripts.

 

Selenium Remote Control (RC):

Selenium Remote Control is a server with which the user can create the Test cases in any desired programming language. The commands present in the test scripts are accepted by the server and sent to the browsers as the Selenium core Java script commands to maintain the browser behavior accordingly

 

Selenium Web driver:

Selenium Web Driver is a programming interface to create and run test cases. It provides a way to act on various web elements. This Web driver does not require another server, unlike Selenium Remote Control.

 

Selenium Grid:

The Selenium Grid is used to distribute the commands to the different machines simultaneously. It paves a way for the parallel execution of the test cases in different browsers and different environments. It achieves concurrency and integrity in the Test Suite Execution.

6. Why should I use Selenium?

  • Open-source
  • Large support from the community and the user base is huge
  • Cross-browser compatibility (Firefox, Chrome, Edge etc.,)
  • Multiple programming language support (Python, Java, Perl etc.,)
  • Every day or regular repository developments
  • Distributed Testing is also supported.

7. What is the major difference between Selenium 3.0 and Selenium 2.0?

Selenium 2.0 represents the merger of the Original Selenium project with the Web Driver project. The Selenium RC got deprecated but was used for backward compatibility.

Selenium 3.0 often called an extension of the Selenium 2.0 is inherently backward compatible with increased stability and several bug fixes and does not involve the Selenium RC at all.

8. What do you mean by Selenese?

Selenese which is called the Selenium command is the set of the selenium commands that run your test cases. For example, open (URL) is a Selenium command which opens the specified URL in the specific browser. A test script is the sequence of all these commands put together. There are three types of Selenese. They are,

  1. Actions: We can use it to perform interactions and operations on the target elements
  2. Accessors: These are used for storing the values in the variables.
  3. Assertions: These can be used as checkpoints to keep track of the sequential flow of commands.
  4.  How many parameters do selenium commands have at a minimum?

There are four parameters that you must pass in Selenium. They are as follows,

  • Host

We can bind the Selenium to a specific IP address instead of a Localhost in our local machine.

  • Port Number

We can specify the port number too i.e., TCP/IP port to connect the Selenium tests to the Grid hub. We need to make sure that there is no other application with the same port number up in any other location within the same machine.

  • Browser

The browser in which the selenium scripts have to be executed.

  • URL

The application URL triggers the test cases within that.

9. What is the difference between the Absolute path and the Relative Path?

Absolute Path: 

  • This path starts from the root node and ends with the desired elements node.
  • It starts with a single slash (/)
  • Example: /html.body/div/td/input

Relative Path:

  • This path starts from any node in between and to the desired elements node.
  • It starts with a double slash (//)
  • Example: //input/example[@id=name]

10. What is the difference between Assert and Verify statements in Selenium?

Assert:

  • We can check whether an element is on the page or not.
  • The test fails and gets terminated whenever there is a fail in the check. That is the program control flow stops.

Verify:

  • It’s only to specify whether the given condition is true or false.
  • The program control flow does not stop due to this.

Overall, the Verify statement does not halt the program execution whereas the Assert statement does halt the execution. 

 

Wants to become an expert selenium tester Join Here: Selenium Training in Chennai