App & Browser Testing Made Easy

Give your users a seamless experience by testing on 3000+ real devices and browsers. Don't compromise with emulators and simulators

Get Started free
Home Guide Selenium RC : Differences from Webdriver

Selenium RC : Differences from Webdriver

By Jash Unadkat, Technical Content Writer at BrowserStack -

This article will help you understand the key differences between Selenium Remote Control (RC) and Selenium WebDriver. It will also give you a glimpse of how Selenium WebDriver changed the testing landscape by overcoming the limitations one would encounter in Selenium RC.

Both RC and WebDriver are test automation tools supporting different programming languages but come with some critical differences.

First, let’s explore the nature and architecture of Selenium RC.

What is Selenium RC?

Selenium RC is an important component in the Selenium test suite. It is a testing framework that enables a QA or a developer to write test cases in any programming language in order to automate UI tests for web applications against any HTTP website.

Selenium RC comprises of two parts:

  • Client libraries for the preferred computer language
  • A server that launches and kills browsers automatically

Refer to the image below for a simplified architectural representation of the structure

Selenium-RC

Image source: Seleniumhq

Selenium RC’s architecture has proven to be complicated for the following reasons:

  • One needs to install and launch a separate application called Selenium Remote Control Server before running test scripts
  • The RC server acts as a mediator between the browser and Selenium commands

The following operations are performed behind the scenes when a test script is executed in Selenium RC:

  • The RC server injects a Javascript program known as Selenium Core into the browser
  • Once the Selenium Core program is injected, it starts receiving instructions from the RC server based on test scripts
    Selenium Core executes all these instructions as JavaScript commands
  • The web browser executes all the commands given by Selenium Core and returns the test summary back to the server

Limitations of Selenium RC:

  • Complicated Architecture
  • Execution of test scripts is time-consuming as Selenium RC uses JavaScript commands as instructions to the browser. This results in slow performance
  • API’s are less object-oriented
  • No support for Headless HTMLUnit browsers (Invisible browser)

The limitations of Selenium RC led to the development of the new automation framework, Selenium WebDriver. After the introduction of WebDriver in 2006, complications arising in RC could be addressed and resolved.

How WebDriver took over Selenium RC?

Selenium WebDriver’s architecture is simpler than that of Selenium RC. Unlike Selenium RC, it does not involve any proxy server and it controls the browser directly from the OS (Operating System) level. This entails a significant reduction in complexity.

Run Selenium Webdriver Tests for Free

Here’s a simplified depiction of the WebDriver architecture :

One just needs to have the following to run test scripts on WebDriver:

  • An IDE (Integrated Development Environment) to write code in their preferred language
  • Web browser to perform the test on

What makes WebDriver the better choice?

  • Simpler architecture as compared to Selenium RC
  • WebDriver has a more concise API and a set of easy to use commands
  • Test script execution is faster than Selenium RC as it makes direct calls to the browser using browser drivers for a particular browser
  • WebDriver also provides support for Headless HTMLUnit browser, iPhone Driver and AndroidDriver

Note: Selenium WebDriver is more efficient and faster compared to RC. However, RC has an advantage over WebDriver in terms of report generations as the results are generated automatically in the form of an HTML file. This feature is not available for WebDriver.

Selenium WebDriver is, without a doubt, one of the most preferred test automation frameworks in the testing ecosystem. By virtue of its simple architecture and easy-to-use commands, it has emerged as a favorite among testers at large.

Tags
Automation Testing Selenium Selenium Webdriver

Featured Articles

Learn Selenium with Java to run Automated Tests

The Complete Guide to Ad hoc Testing

App & Browser Testing Made Easy

Seamlessly test across 20,000+ real devices with BrowserStack