Selenium – Introduction

Selenium is a free (open source) and a portable automated software testing tool for testing web applications. It has capabilities to operate across different browsers and operating systems. It is quite similar to HP Quick Test Pro (QTP) only that Selenium focuses on automating web-based applications.

Selenium is not just a single tool but a set of tools that helps testers to automate web-based applications more efficiently. It has four components.

  • Selenium Integrated Development Environment (IDE) – IDE is a Firefox plugin that lets testers to record their actions as they follow the workflow that they need to test.
  • Selenium Remote Control (RC) – RC was the flagship testing framework that allowed more than simple browser actions and linear execution. It makes use of the full power of programming languages such as Java, C#, PHP, Python, Ruby and PERL to create more complex tests.
  • Selenium WebDriver – Selenium WebDriver is the successor to Selenium RC which sends commands directly to the browser and retrieves results.
  • Selenium Grid – Selenium Grid is a tool used to run parallel tests across different machines and different browsers simultaneously which results in minimized execution time.

Selenium Component

Selenium 2

In 2008, the Selenium Team decided to merge WebDriver and Selenium RC to form a more powerful tool  called Selenium 2, with WebDriver being the core. Currently, Selenium RC is still being developed but only in maintenance mode. Most of the Selenium Project’s efforts are now focused on Selenium 2.

Selenium Advantages:

  • Selenium is open source, free and portable tool.
  • Selenium supports many operating systems like Windows, Linux, Unix etc.
  • Selenium supports variety of languages that include Java, C#, Perl, Python, Ruby, Groovy, Java Script, and VBScript. etc.
  • Selenium supports many browsers like Internet explorer, Chrome, Firefox, Opera, Safari etc.
  • Selenium have a large user base and helping communities
  • Selenium can be integrated with ANT or Maven kind of framework for source code compilation.
  • Selenium can be integrated with TestNG testing framework for testing our applications and generating reports.
  • Selenium can be integrated with Jenkins or Hudson for continuous integration.
  • Selenium can be used for Android, IPhone, Blackberry etc. based application testing.
  • Selenium supports very less CPU and RAM consumption for script execution.
  • Selenium comes with different component to provide support to its parent which is Selenium IDE, Selenium Grid and Selenium Remote Control (RC).

Selenium Disadvantages:

  • Selenium needs very much expertise resources. The resource should also be very well versed in framework architecture.
  • Selenium only supports web based application and does not support windows based application.
  • It is difficult to test Image based application.
  • Selenium need outside support for report generation activity like dependence on TestNG or Jenkins.
  • Selenium does not support built in add-ins support.
  • Selenium user lacks online support for the problems they face.
  • Selenium does not provide any built in IDE for script generation and it need other IDE like Eclipse for writing scripts.
  • Selenium does not have own object repository like QTP.
  • Selenium script creation time is bit high.

Browser and Environment Support

Selenium IDE, Selenium RC, and WebDriver support different sets of browsers and operating environments as shown below.

Selenium IDE Selenium RC WebDriver
Browser Support Mozilla Firefox Mozilla Firefox Internet Explorer Google Chrome Safari Opera Others Internet Explorer versions 6 to 9, both 32 and 64-bit

Firefox 3.0, 3.5, 3.6, 4.0, 5.0, 6, 7 and above

Google Chrome 12.0.712.0 and above

Opera 11.5 and above

Android – 2.3 and above for phones and tablets

HtmlUnit 2.9 and above

iOS 3+ for phones (devices & emulators) and 3.2+ for tablets (devices & emulators)

Operating System Windows Mac OS X Linux Windows Mac OS X Linux Solaris All operating systems where the browsers above can run

Comparison between Selenium and QTP

Selenium QTP
Open source, free to use, and free of charge. Commercial.
Highly extensible Limited add-ons
Can run tests across different browsers Can only run tests in Firefox , Internet Explorer and Chrome
Supports various operating systems Can only be used in Windows
Supports mobile devices Supports mobile device using third party software
Can execute tests while the browser is minimized Needs to have the application under test to be visible on the desktop
Can execute tests in parallel Can only execute in parallel but using Quality Center which is again a paid product.

Leave a Reply

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