An Introduction to Selenium, an Open Source Web Automation Tool
Selenium is a software testing framework for Web applications. One of its advantages is that you don’t have to know any test scripting language. Selenium has rivals too, the main one being QTP. This article is a primer on Selenium in its various avatars.
Selenium is the most popular open source automation testing tool for Web based applications. The reason behind its success is its compatibility with all available Web browsers. The major difference between HP’s QTP (Quality Test Professional) and Selenium is that QTP is used for automating desktop applications along with Web applications, while Selenium is used primarily for Web based applications. When it comes to handling the behaviour of various Web elements like properties, Selenium leads the race against QTP.
In this introductory tutorial, we will be exploring Selenium from the beginner’s viewpoint, starting with the very basics, and go on to learn more about its features and compatibilities.
So, as we said before, Selenium is the open source automation testing suite for Web based applications. It is considered a test suite rather than a tool because it supports multiple capabilities catering to various needs. The Selenium test suite comprises four components: Selenium Integrated Development Environment (IDE) Selenium Remote Control (RC) Selenium WebDriver Selenium Grid Right now, Selenium RC and WebDriver are collectively known as Selenium 2, while Selenium RC alone is known as Selenium 1.
History
Let’s talk a bit about the developers behind this tool. Selenium is a collection of various tools, with contributions coming from many developers who have in the past worked to make it the most suitable test automation tool for Web based applications. The main credit goes to Jason Huggins for Selenium’s foundation. He started it way back in 2004 when he was an engineer with ThoughtWorks, and was working on one of the Web applications that required frequent testing. To tackle the repetitive manual tasks, he came up with a JavaScript code which could automatically control the browser’s actions. At that time, he named it JavaScriptTestRunner. After seeing its ability to handle browser components, he made the code open source so that others could also contribute, and named it Selenium Core. Later on, various developers kept adding their code to make it a complete test suite, i.e., what we see today. The other main contributors are Paul Hammant (Selenium RC), Patrick Lightbody (Selenium Grid), Shinya Kasatani (Selenium IDE), and Simon Stewart (WebDriver).
Selenium IDE
Selenium IDE is the simplest tool in the Selenium test suite. It is a Firefox plug-in that you can install like all other plugins. However, it doesn’t give you many advanced features to tackle complex test cases but is suitable as a prototyping tool. You will not require any prior programming experience but awareness of HTML is helpful. You can export tests from here to Selenium RC and WebDriver. The pros of Selenium IDE are: Very easy to use and install No programming experience is required, though knowledge of HTML and DOM is needed Can export test cases to formats usable in Selenium RC and WebDriver