Wednesday, October 2, 2013

Choosing among Selenium IDE, RC and Webdriver

Selenium has a lot of different components due to which people often get confused which one to use.
In today's post we will see the features and limitations of different components of Selenium and the purpose of using them.

Why to use Selenium IDE

Selenium IDE was created by Shinya Kasatani to increase the speed of creating the test cases. It has record & playback options which help you to create simple tests quickly (with in seconds).It has a very good user interface and also supports multiple extensions.
Limitation: The main limitation of Selenium IDE is that, it supported in only Firefox browser and basically used as a rapid prototyping tool. For serious, robust test automation and to run your scripts in different browsers, you should use Selenium 1 or Selenium 2.

Why to use Selenium 1 or Selenium RC

Selenium 1 is also known as Selenium RC, was created by Paul Hammant to create a server which allows you to run HTML test suites in a range of different browsers like IE, Mozilla, Chrome, Opera, Safari etc.It also supports multiple languages like Java, Ruby, C#, Perl, Python etc. Similar to language independent it is also platform independent, same code will work on Windows OS, Linux, Mac & Solaris. Selenium RC server only supports the Selenium 1 API's.
Limitation: The main limitation of Selenium RC is that we have to start & stop the server to execute the test scripts.

Why to use Webdriver

To overcome this issue & increase the scope of Selenium RC, Simon Stewart introduced the new version of selenium called as Selenium Webdriver. It was the first cross-platform testing framework that could control the browser from the OS level. It is the actual core API which allows you to write standalone tests. It has all the same features as of RC. Main feature of webdriver over the Selenium RC is that we don’t need to start the server to run the test scripts.

Limitation: Webdriver cannot readily support new browsers because different browsers communicate with OS in different ways and the webdriver operates on the OS level.

Selenium 2 is the latest version of the Selenium project, and includes the IDE, Server and both the Selenium RC and WebDriver APIs, with WebDriver being the core. Selenium 2 still runs Selenium 1’s RC interface for backward compatibility. It supports the WebDriver API and underlying technology, along with the Selenium 1 technology for maximum flexibility in porting your tests.Selenium 2 includes more cohesive and object oriented API making it a much more robust automation tool. Most of the Selenium Project’s efforts are now focused on Selenium 2.

Recommended Selenium Tool
Those who are completely new to Selenium should go with Selenium 2 since this is the portion of Selenium that will continue to be supported in the future. Using webdriver API's of Selenium 2 is recommended.


1 comment: