Common Selenium interview question with answers can be found on this site. Being Senior QA Tester, I started to put together and continuously update interview question for Selenium test automation tool. These questions were asked during real QA interviews for Selenium QA Automation Engineer position in the leading companies. I believe that any QA Engineer, no matter seasoned one or novice one, would greatly benefits from this collection Selenium interview questions and tips. If you are plan to attend an interview you need to know the answers on these Selenium questions by heart. I provided answers on several technical interview questions, but you have to think how you would personally answer these questions. Finally, I would ask anyone of you to provide answers on unanswered Selenium interview question, so we all would benefit from this knowledge sharing and it would help us to land on Selenium QA Automation Engineer job and work successfully. If you were asked the interview question that is not in the list, post it with your answer.

Common Selenium interview questions for QA Engineers

HERE ARE THE SELENIUM INTERVIEW QUESTIONS:
Last updated on May 25, 2012

  • What is Selenium?
  • Selenium is a suite of tools for browser automation. It is composed of "IDE", a recording and playback mechanism, "WebDriver" and Remote Control "RC" which provide APIs for browser automation in a wide variety of languages, and "Grid", which allows many tests using the APIs to be run in parallel. QA Tester should not forget to mention during interview that with the release of Selenium 2, Selenium RC has been officially deprecated in favor of Selenium WebDriver. It works with most browsers, including Firefox 3.6 and the last, latest and next release of Firefox (currently Firefox 9-11); Internet Explorer 6 and up; Google Chrome; Safari 4 and 5; Android Ice Cream Sandwich and onwards; and Opera 11.6+.

  • Describe technical problems that you had with Selenium tool?
  • As with any other type of test automation tools like SilkTest, HP QTP, Watir, Canoo Webtest, Selenium allows to record, edit, and debug tests cases. However there are several problems that seriously affect maintainability of recorded test cases, occasionally Quality Assurance Engineers complain that it takes more time to maintain automated test cases than to perform manual testing; however this is an issue with all automated testing tools and most likely related to improper testing framework design. Another problem is complex ID for an HTML element. If IDs is auto-generated, the recorder test cases may fail during playback. The work around is to use XPath to find required HTML element. Selenium supports AJAX without problems, but QA Tester should be aware that Selenium does not know when AJAX action is completed, so ClickAndWait will not work. Instead QA tester could use pause, but the snowballing effect of several 'pause' commands would really slow down total testing time of test cases. The best solution would be to use waitForElement.




  • What test can Selenium do?
  • Selenium could be used for the functional, regression, load testing of the web based applications. The automation tool could be implemented for post release validation with continuous integration tools like Jenkins, Hudson, QuickBuild or CruiseControl.

  • What is the price of Selenium license per server?
  • Selenium is open source software, released under the Apache 2.0 license and can be downloaded and used without charge.

  • How much does Selenium license cost per client machine?
  • Selenium is open source software, released under the Apache 2.0 license and can be downloaded and used without charge.

  • Where to download Selenium?
  • Selenium can be downloaded and installed for free from seleniumhq.org

  • What is the latest version of Selenium components?
  • The latest versions are Selenium IDE 1.8.0, Selenium Server (formerly the Selenium RC Server) 2.22.0, Selenium Client Drivers Java 2.22.0, Selenium Client Drivers C# 2.22.0, Selenium Client Drivers Ruby 2.21.0, Selenium Client Drivers Python 2.22.1.

  • What is Selenium IDE?
  • Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test cases, which QA Tester can play back in the Firefox browser or export to Selenium RC. Selenium IDE has the following features: record/play feature, debugging with step-by-step and breakpoints, page abstraction functionality, an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE
Selenium

  • What are the limitations of Selenium IDE?
  • Selenium IDE has many great features and is a fruitful and well-organized test automation tool for developing test cases, in the same time Selenium IDE is missing certain vital features of a testing tool: conditional statements, loops, logging functionality, exception handling, reporting functionality, database testing, re-execution of failed tests and screenshots taking capability. Selenium IDE doesn't for IE, Safari and Opera browsers.

  • What does SIDE stand for?
  • Selenium IDE. It was a very tricky interview question.

  • What is Selenium Remote Control (RC) tool?
  • Selenium Remote Control (RC) is the powerful solution for test cases that need more than simple browser actions and linear execution. Selenium-RC allows the developing of complex test scenarios like reading and writing files, querying a database, and emailing test reports. These tasks can be achieved by tweaking test cases in your preferred programming language. Selenium RC has been officially deprecated in favor of Selenium WebDriver.

  • What are the advantages using Selenium as testing tool?
  • If QA Tester would compare Selenium with HP QTP or Micro Focus SilkTest, QA Engineer would easily notice tremendous cost savings for Selenium. In contrast to expensive SilkTest license or QTP license, Selenium automation tool is absolutely free. It means that with almost no investment in purchasing tools, QA Team could easily build the state of the art test automation infrastructure. Selenium allows developing and executing test cases in various programming languages including .NET, Java, Perl, RubyPython, PHP and even HTML. This is a great Selenium advantage, most likely your software developers already know how to develop and maintain C# or Java code, so they transfer coding techniques and best practices to QA team. Selenium allows simple and powerful DOM-level testing and in the same time could be used for testing in the traditional waterfall or modern Agile environments. Selenium would be definitely a great fit for the continuous integration tools Jenkins, Hudson, CruiseControl, because it could be installed on the server testing box, and controlled remotely from continuous integration build.




  • What is Selenium Grid?
  • Selenium Grid extends Selenium RC to distribute your tests across multiple servers, saving you time by running tests in parallel.

  • What is Selenium WebDriver?
  • Selenium WebDriver is a tool for writing automated tests of websites. It is an API name and aims to mimic the behavior of a real user, and as such interacts with the HTML of the application. Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated.

  • How many browsers are supported by Selenium IDE?
  • Test Engineer can record and playback test with Selenium IDE in Firefox.

  • Can Selenium test an application on iPhone's Mobile Safari browser?
  • Selenium should be able to handle Mobile Safari browser. There is experimental Selenium IPhone Driver for running tests on Mobile Safari on the iPhone, iPad and iPod Touch.

  • Can Selenium test an application on Android browser?
  • Selenium should be able to handle Android browser. There is experimental Selenium Android Driver for running tests in Android browser.

  • What are the disadvantages of using Selenium as testing tool?
  • Selenium weak points are tricky setup; dreary errors diagnosis; tests only web applications

  • How many browsers are supported by Selenium Remote Control?
  • QA Engineer can use Firefox 7, IE 8, Safari 5 and Opera 11.5 browsers to run actuall tests in Selenium RC.

  • How many programming languages can you use in Selenium RC?
  • Several programming languages are supported by Selenium Remote Control - C# Java Perl PHP Python Ruby

  • How many testing framework can QA Tester use in Selenium RC?
  • Testing frameworks aren't required, but they can be helpful if QA Tester wants to automate test cases. Selenium RC supports Bromine, JUnit, NUnit, RSpec (Ruby), Test::Unit (Ruby), TestNG (Java), unittest (Python).

  • How to developer Selenium Test Cases?
  • Using the Selenium IDE, QA Tester can record a test to comprehend the syntax of Selenium IDE commands, or to check the basic syntax for a specific type of user interface. Keep in mind that Selenium IDE recorder is not clever as QA Testers want it to be. Quality assurance team should never consider Selenium IDE as a "record, save, and run it" tool, all the time anticipate reworking a recorded test cases to make them maintainable in the future.

  • What programming language is best for writing Selenium tests?
  • The web applications may be written in Java, Ruby, PHP, Python or any other web framework. There are certain advantages for using the same language for writing test cases as application under test. For example, if the team already have the experience with Java, QA Tester could always get the piece of advice while mastering Selenium test cases in Java. Sometimes it is better to choose simpler programming language that will ultimately deliver better success. In this case QA testers can adopt easier programming languages, for example Ruby, much faster comparing with Java, and can become become experts as soon as possible.



  • Do you know any alternative test automation tools for Selenium?
  • Selenium appears to be the mainstream open source tool for browser side testing, but there are many alternatives. Canoo Webtest is a great Selenium alternative and it is probably the fastest automation tool. Another Selenium alternative is Watir, but in order to use Watir QA Tester has to learn Ruby. One more alternative to Selenium is Sahi, but is has confusing interface and small developers community.


  • Compare HP QTP vs Selenium?
  • When QA team considers acquiring test automation to assist in testing, one of the most critical decisions is what technologies or tools to use to automate the testing. The most obvious approach will be to look to the software market and evaluate a few test automation tools. Read Selenium vs QTP comparison



  • How can I learn to automate testing using Selenium?
  • Don't be surprised if the interviewer asks you to describe the approach for learning Selenium. This interviewer wants to hear how you can innovative software test automation process the company. Most likely they are looking for software professional with a good Selenium experience, who can do Selenium training for team members and get the team started with test automation. I hope this Selenium tutorial will be helpful in the preparation for this Selenium interview question.

to be continued

Selenium 2 Webdriver vs QTP

There are many articles which compare Selenium 2 Webdriver with HP QTP and I want to add a one more valid comparison measurement - jobs
Just look at Selenium vs QTP job posting trends from Indeed.com above. Selenium jobs continue to explode and Selenium now garners more job postings than HP QTP.

What is the best programming language for Selenium 2 ?

The tough Selenium 2 interview questions for QA Manager : Imagine that you have decided to do test automation for web based application using Selenium 2. What would be the best language to learn along with Selenium 2 for the team of QA Testers?

As a candidate for QA Manager I would start this way:

This choice is a little bit simpler for Selenium 2 than Selenium, because Selenium 2 supports Java, Ruby, C#, and Python, but does not yet support Perl or PHP. Obviously you have to choose only from four languages and there are several factors to consider.

Introducing a new language to a team isn't an easy task. The best choice will be to use a language QA Testers are familiar with. Learning Selenium 2 and learning a new programming language is a lot tougher than learning just Selenium 2.

Next things to consider is the local support for the programming language. For example, if local developers already have an experience with Java, this language might be a better choice for QA Testers. If the tester needs help with the language, the development tools, the defects then leverage in-house expertise would be much better.

In general the language you'll get the most out of Selenium 2 is Java, because the Java client code is the first developed and the standard for correctness. For example HtmlUnit Driver, fastest and most lightweight implementation of WebDriver, would require Selenium Server for any language binding other than Java.

Related books

  1. Best Java books for beginners

Adobe Selenium Meetup

Do you want to know how Adobe uses Selenium for test automation and not testing purposes? Do you want to know how to do test data extraction and generation using Selenium? Do you want to meet with other Selenium testers from Bay Area?

Join the next San Jose Selenium Meetup at Adobe East Tower, 321 Park Ave, San Jose, CA on Wednesday, February 28, 2012 at 6:30 PM.

Selenium QA Testers around the world can attend the event online via Adobe Connect

Selenium 2 WebDriver Interview Question - WebDriver best practices

Best practices in interviewing Selenium QA Tester obviously include the questions about Selenium best practices for web application testing. For example QA Manager could ask about best practices fort creating Selenium WebDriver instances. Should all test cases use a single WebDriver instance or should every test case create a new WebDriver instance?

Selenium QA Tester with a practical experience most likely would answer that reusing WebDriver instances between test case will save time when using ChromeDriver, InternetExplorerDriver, FirefoxDriver, OperaDriver drivers, but provides almost no time benefits for HtmlUnitDriver. In the same time one of the testing goals is to have reproducible tests and keeping WebDriver running between test cases may provide side-effects. The recommendation would be to create a new WebDriver instance for every test execution. In this case each test case would be executed independently from any other test case.

Selenium 2 interview question - HtmlUnitDriver benefits and drawbacks

QA Tester could significantly reduce the time required for Selenium 2 test cases execution, by running test cases with HtmlUnitDriver, instead of InternetExplorerDriver or FirefoxDriver, but how reliable is HtmlUnitDriver and what are the benefits or drawbacks of using HtmlUnitDriver?

HtmlUnit Driver is obviously the fastest and most lightweight implementation of WebDriver. In the same time the experienced QA Tester would recommend to use HtmlUnitDriver only for websites with minimal JavaScript. The main reason for this is that none of popular browsers like Chrome, Firefox or IE use Rhino JavaScript, while HtmlUnitDriver used it. It means while testing with HtmlUnit Driver, QA Tester should expect mostly the same behavior, but some of the tests may fail.

Selenium 2 interview question - How to run Selenium WebDriver without opening browser?

The experienced Selenium Test Engineer will definitely notice that running several hundreds of test cases developed in Selenium WebDriver with using FirefoxDriver and InternetExplorerDriver may take a time, and sooner or later Selenium Test Engineer will ask this questions: Is it possible to run Selenium WebDriver tests without opening browser windows?

The most obvious option will be to use HtmlUnitDriver - the fastest and most lightweight implementation of WebDriver. HtmlUnit Driver is a pure Java driver, runs entirely in-memory, and because of this, QA Tester won't see a browser window during test executing. It is a huge time saver over using real browsers for executing test cases developed with Selenium 2.