Tuesday, 11 September 2012

selenium Interview Questions

Q1. What is Selenium?

 Ans. Selenium is a set of tools that supports rapid development of test automation scripts for web based applications. Selenium testing tools provides a rich set of testing functions specifically designed to fulfill needs of testing of a web based application.

Q2. What are the main components of Selenium testing tools?

Ans. Selenium IDE, Selenium RC and Selenium Grid

Q3. What is Selenium IDE?

Ans. Selenium IDE is for building Selenium test cases. It operates as a Mozilla Firefox add on and provides an easy to use interface for developing and running individual test cases or entire testsuites. Selenium-IDE has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back.

Q4. What is the use of context menu in Selenium IDE?
Ans. It allows the user to pick from a list of assertions and verifications for the selected location.

Q5. Can tests recorded using Selenium IDE be run in other browsers?
Ans. Yes. Although Selenium IDE is a Firefox add on, however, tests created in it can also be runin other browsers by using Selenium RC (Selenium Remote Control) and specifying the name of the test suite in command line.

Q6. What are the advantage and features of Selenium IDE?
 Ans. 1. Intelligent field selection will use IDs, names, or X Path as needed2. It is a record & playback tool and the script format can be written in various languages including: C#, Java, PERL, Python, PHP, HTML3. Auto complete for all common Selenium commands4. Debug and set breakpoints5. Option to automatically assert the title of every page6. Support for Selenium user-extensions.js file

Q7. What are the disadvantage of Selenium IDE tool?
Ans. 1. Selenium IDE tool can only be used in Mozilla Firefox browser.2. It is not playing multiple windows when we record it.

Q8. What is Selenium RC (Remote Control)?
Ans. Selenium RC allows the test automation expert to use a programming language for maximum flexibility and extensibility in developing test logic. For example, if the application under test returns a result set and the automated test program needs to run tests on each element in the result set, the iteration / loop support of programming language can be used to iterate through the result set, calling Selenium commands to run tests on each item. Selenium RC provides an API and library for each of its supported languages. This ability to use Selenium RC with a high level programming language to develop test cases also allows the automated testing to be integrated with the projects automated build environment.


Q9. What is Selenium Grid?
 Ans. Selenium Grid in the selenium testing suit allows the Selenium RC solution to scale for testsuites that must be run in multiple environments. Selenium Grid can be used to run multipleinstances of Selenium RC on various operating system and browser configurations.

. How Selenium Grid works?
 Ans. Selenium Grid sent the tests to the hub. Then tests are redirected to an available Selenium RC, which launch the browser and run the test. Thus, it allows for running tests in parallel with the-entire test suite.

Q 11. What you say about the flexibility of Selenium test suite?
[/b]Ans. Selenium testing suite is highly flexible. There are multiple ways to add functionality to Selenium framework to customize test automation. As compared to other test automation tools, itis Selenium¶s strongest characteristic. Selenium Remote Control support for multiple programming and scripting languages allows the test automation engineer to build any logic they need into their automated testing and to use a preferred programming or scripting language of one¶s choice. Also,the Selenium testing suite is an open source project where code can be modified and enhancements can be submitted for contribution.

Q12. What test can Selenium do?
Ans. Selenium is basically used for the functional testing of web based applications. It can be used for testing in the continuous integration environment. It is also useful for agile testing

Q13. What is the cost of Selenium test suite?
Ans. Selenium test suite a set of open source software tool, it is free of cost.

Q14. What browsers are supported by Selenium Remote Control?
Ans. The test automation expert can use Firefox, IE 7/8, Safari and Opera browsers to run tests in Selenium Remote Control.

Q15. What programming languages can you use in Selenium RC?
Ans. C#, Java, Perl, PHP, Python, Ruby


Q16.What are the advantages and disadvantages of using Selenium as testing tool?
Ans. Advantages: Free, Simple and powerful DOM (document object model) level testing, can beused for continuous integration; great fit with Agile projects.Disadvantages: Tricky setup; dreary errors diagnosis; can not test client server applications.



Q17.What is difference between QTP and Selenium?
Ans. Only web applications can be testing using Selenium testing suite. However,
QTP can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer,Firefox, Safari, Opera or Conqueror on Windows, Mac OS X and Linux. However,
QTP is limited to Internet Explorer on Windows.

QTP uses scripting language implemented on top of VB script. However, Selenium test suite haste flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.

Q18. What is difference between Borderland Silk test and Selenium?
Ans. Selenium is completely free test automation tool, while Silk Test is not. Only web application scan be testing using Selenium testing suite. However, Silk Test can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer, Firefox, Safari,Opera or Conqueror on Windows, Mac OS X and Linux. However, Silk Test is limited to Internet Explorer and Firefox.Silk Test uses 4Test scripting language. However, Selenium test suite has the flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.

What makes Automated Software Testing important in the companies?

Tests are repeated quite often during the development cycle as to ensure the quality of the software.

So, whenever the source code is modified tests should be repeated,where in it has to be tested on all supporting operating system and hardware. Doingthis manually would be costly and time consuming, Therefore, automation testing canbe done over and over again at no additional cost and would also save time ascompared to manual testing.

Secondly, automation testing would improve theaccuracy.

Below are some main reasons, why automation testing is crucical in the companies.Firstly automated software testing helps to save time as well money. Every timesource code is modified software tests should be repeated. For each release of thesoftware it may be tested on all supported operating systems and hardwareconfigurations.

Manually repeating these tests is costly and time consuming. Oncecreated, automated tests can be run over and over again at no additional cost and theyare much faster than manual tests.

Secondly, Automated

Software Testing

ImprovesAccuracy as compared to monotonous manual testing. Thirdly, automated softwaretesting can increase the depth and scope of the test to help improve software quality.


Shared automated tests can be used by developers to catch problems quickly before sending to QA. Tests can run automatically whenever source code changes rechecked in and notify the team or the developer if they fail. Features like these save developers time and increase their confidence.Automation test scripts will be used as a way of storing domain/project/task Knowledge gained by the Test Engineers.

Say for example, if a Tester works in project for one year, he might have spent more time for learning the domain, purpose of the project, modules in the project, flow of all functionalists.

He will be familiar with known issues and challenges.

If this Tester leaves from the project, the knowledge gained by him also will leave.

It is very difficult for the newly joining Tester to understand everything from the Test Case document.


f automation test scripts are already available then the new Tester can just start the testing by running the automation scripts, without gaining much knowledge about the project.

He can understand the flow/data by seeing the execution of the automation test scripts.

But anyway, he should gain project/domain knowledge to enhance/update the automation scripts further.

So we can say that test automation is a way of storing knowledge.

1 comment: