20 Top Selenium Interview Question

Following are the some basic and advanced 20 Top Selenium Interview Question and answer for both beginner and experience Selenium Tester. We have focused on Selenium WebDriver, TestNG, Component of Selenium etc.

Before going ahead, please have a look on Selenium Tutorial to have some better understanding on the Selenium basic.

1. What is Selenium?

Ans. Selenium is open source automation testing tool. This is used to create test script for web based application across different browsers and platform.

2. Which programming language is supported b Selenium?

Ans. Selenium can support multiple programming language like Java, Python, C#, Perl, PHP, Ruby etc.

3. What is Automation testing?

Ans. Automation Testing is the testing type in which testing can be executed through test script. The automation test script verify the SUT (System Under Test), compare the result and generate the report in a proper format.

4. What are advantages of Selenium ?

Ans. Below are some advantages of Selenium.

  • Selenium is an open source automation testing tool. It has not hidden or direct cost involved. You can download freely and customize based on your requirement. Selenium has big community and you can get support from that community
  • Selenium supports multiple language like Java, Python, C#, PHP, Perl and Ruby and more. Though Selenium has its own script, it is not binding to specific language.
  • Like language, Selenium also supports multiple platform like Windows, Linux, Mac etc. You can create selenium test script based on platform by using Selenium Grid.
  • Selenium also supports multiple browsers like Mozilla, Chrome, IE, Safari etc. If you can specify the browsers details by using setProperty() and pass browser driver details in parameter.
  • Selenium can integrate with different framework like ANT, Maven for code compilation and TestNG framework for testing and report generation. Addition to this selenium can be integrated with Jenkins for Continuous Integration.
  • Selenium automation testing can be implemented with mobile web application on Android, IPhone etc. Directly it is not possible but if you will use third party plugin then we can achieve this.
  • Selenium has large community for support. You can get help, update on new release quickly
  • Selenium is generally known as Suites as it loaded packages of various testing tool.
  • Selenium is a user friendly and easy to use. As it is an open source tool, you can customize based on your requirement.
  • Selenium supports parallel test execution. This will help to run more test in less time.
  • When it compares to other testing tool like QTP , RFT, SilkTest, Selenium requires very less interaction with hardware resources.
  • Test Management like grouping, excluding test, including test, skip test can be supported by Selenium

5. What are disadvantages of Selenium ?

Ans. Below are some disadvantages of Selenium.

  • Selenium is less reliable than QTP as there is no reliable technical support provided
  • It supports web application only. You can not automate any desktop application or mobile native application.
  • Little difficult to setup the test environment as compared to QTP, RFT etc.
  • There is less support for Image Testing.
  • There is not support for build-in reporting tool. This is rely on third party plugin for report generation.

6. What is WebDriver?

Ans. WebDriver is testing framework that allows you to create automation test scrip against different browsers like Chrome, Mozilla, IE etc. It used browsers driver to communicate corresponding browsers.

WebDriver contributes WebDriver API to support DOM interaction.

 What is WebDriver?

7. What are the automation tools?

Ans. There are lots of automation tool exist in software testing industry. Some of them are

  • Selenium
  • QTP
  • SOAP UI
  • Watir
  • TestComplete
  • Visual Studio Test Professional
  • Telerik Test Studio
  • Test Drive
  • JMeter
  • LeapWork
  • Appium
  • WorkSoft
  • Testimony
  • Renorex
  • Subject7 etc.

8. What are the platforms supported by Selenium?

Ans. Selenium supports different platform to execute automation test script. Some of them are

  • Windows
  • MAC
  • Linux etc.

9. What are the browsers supported by Selenium?

Ans. Selenium supports different platform to execute automation test script. Some of them are

  • Mozilla Firefox
  • Google Chrome
  • IE
  • Safari
  • Opera etc

10. What are the components of Selenium?

Ans. Selenium has four component. i.e.

  • Selenium IDE
  • Selenium RC
  • Selenium WebDriver
  • Selenium Grid

11. What is Selenium IDE?

Ans. Selenium IDE is the simple and easy tool in Selenium automation testing world. This is also called as Firefox add-on which acts like a Record and Play functionality.

12. What are the features of Selenium IDE ?

Ans. Below are the features of Selenium IDE.

  • IDE is powerful plugin which support record and play feature. It is a Integrated Development Environment for creating Test case.
  • IDE is supported by Mozilla Firefox browsers only.
  • It is very easy to configure and tracking result.
  • This also support writing our own customized, Parameterized test case. This feature signifies that IDE is very User friendly.
  • IDE can also support the test case export functionality. It also can export in many language like Java, C#, Ruby etc.
  • It is an only Firefox plugin supported by only older version.
  • Though it is very simple and easy to use. It has lots of disadvantage.
  • It is based on JavaScript. Also supports its own language

13. What is Selenium RC?

Ans. Selenium RC is known as Selenium 1. In RC, communication between test script and browsers are happened through a third party called as RC. It still contains the redundancy and confusion to understand the commands.

For Example, to perform the click action. You need only one function called Click. But in case of RC there are several function to call click action which may create confusion like click or mouseDown, click or mouseAt , type or typeKeys etc.

14. What is Selenium WebDriver ?

Ans. WebDriver is testing framework that allows you to create automation test scrip against different browsers like Chrome, Mozilla, IE etc. It used browsers driver to communicate corresponding browsers.

WebDriver contributes WebDriver API to support DOM interaction.

Selenium WebDriver

15. What is Selenium Grid ?

Ans. Selenium Grid is nothing but running test script in different platform at the same time. If you have 5 different test case for login scenario. And you need to run all these 5 test cases in different OS and different browser to check the compatibility.

For this you need to create a master- slave system and distributed system. Then write the test code in master system and configure based on slave system. And run the test script in master system. As a result, your execution time become less

This supports this process in which we can run our script in different OS and browser simultaneously in a stipulated time. You can run the test cases parallel in multiple environment  and multiple platforms.

20 Top Selenium Interview Question

16. What is the difference between RC and WebDriver ?

Web DriverRC
Selenium WebDriver is the advance version of RC. It overcome the limitations of the RC with some new features.Selenium RC is the older version of WebDriver. It is called Remote control because
In Selenium WebDriver. You can directly interact with the browsersIn Selenium RC, you do not need to directly interact with the Browser. With HTTP proxy, you can connect to browser remotely.
Architecture of the WebDriver is simpleArchitecture of Selenium RC is complex
WebDriver has a driver for each browser. e.g. if you want to run the test in Firefox then WebDriver will use Firefox Driver to run the automated test.Server which is written in java acts as a HTTP Proxy in Selenium RC.The server translates the command received over HTTP into JavaScript and ‘injected’ JavaScript functions into the browser.
WebDriver supports HtmlUnit driver which can run Test Script in headless mode. RC needs real browsers to run the test scripts.
Web driver cannot readily support new browsers since a driver code for new browser needs to be written to provide supportRC can support any browsers easily.
Addition to web application, WebDriver supports iPhone, android.RC supports only Web Application.
WebDriver has a big support community to support RC has limited support team.
WebDriver connects the browsers using built-in support of browsers. RC injects JavaScript into browsers at the time of page load.
As WebDriver connects browsers directly then it behaves more like a user interaction Though RC injects JavaScript to connect to browsers. It acts almost similar manner.
WebDriver is Faster RC is slower as compared to WebDriver
You do not need to start server to execute the script in case of WebDriverYou need to run the Selenium RC server to execute the program
By default, WebDriver maintains page synchronization RC does not support this feature
WebDriver APIs are more concise than RCWebDriver APIs are more concise than RC
By default, WebDriver maximize the browsersRC does not maximize the browsers by default.
WebDriver hides command history windowRC always shows the command history window.

17. What is JSON wire protocol ?

JSON is known as JavaScript Object Notation which is used for exchanging data on wed. It supports data structure and easy to write and read from JSON. To Learn More about JSON Please follow JSON Tutorial.

18. What is Browser drivers?

Selenium uses the driver to communicate with the browsers without revealing the internal logic of Browser functionality. This browser driver also specific to the language liker Java, C#, Ruby etc.

The following operations are performed when we execute the script for drive.

  • HTTP request is created and sent to the browser driver for every selenium command.
  • The driver receives HTTP request through HTTP Server.
  • HTTP Server perform the instruction received from sender which are executed on browser.
  • Execution status is reverted back to HTTP Server which is subsequently sent back to script.

19. What are the limitations of Selenium RC?

  1. Both RC and WebDriver support the multiple language to design the test script. But communicating / establishing the connection between driver to browser will be faster in Web Driver than RC. Because in RC connection is happening through the medium called RC. But in WebDriver, connection is happening directly to Browser.
20 Top Selenium Interview Question
20 Top Selenium Interview Question

2. In case of Selenium API, WebDriver commands are very easy to understand and use. RC still contains the redundancy and confusion to understand the commands. WebDriver command is more used now as days rather than RC.

For Example, to perform the click action. You need only one function called Click. But in case of Selenium RC there are several function to call click action which may create confusion like click or mouseDown, click or mouseAt , type or typeKeys etc.

3. When you come to headless browser, WebDriver is the best option to use, One of the headless browsers is HtmlUnit. This is termed as “headless” because it is GUI less i.e invisible browser.

This is very fast as there is no waiting time to load the browser. As you don’t have any visual browser to work on it, you need to control through automation script only.

This feature is not supported by Selenium RC.

4. When you come to performance issue, WebDriver is better than RC as it is directly communicating to browser. In Selenium RC, RC Server acts as a “middle man” between selenium command and browser.

20. What is Selenese?

Ans. Selenese is the set of selenium commands which are used to test your web application.

Leave a Reply

Your email address will not be published. Required fields are marked *