Selenium WebDriver Vs Selenium RC

Selenium RC had a lot of limitations which eventually led to the development of Selenium WebDriver.

See the major differences between Selenium RC and Selenium WebDriver:

1. Architecture

The architecture of Selenium RC is complicated because it uses an intermediate RC Server to communicate with the browser. The RC Server is installed initially before running the test scripts and acts as mediator between your Selenium commands and your browser.

When we execute a test script in Selenium RC, the following operations are performed internally.

  • The server injects a JavaScript program known as Selenium Core into the browser.
  • Subsequently, Selenium Core will start receiving the instructions (Selenium commands) from the RC Server.
  • When all the instructions are received, Selenium Core will execute them as JavaScript commands.
  • These JavaScript commands act as instructions to the browser.
  • The browser will execute all of the instructions provided by Selenium Core and returns an overall summary to the Server. This overall summary acts as the final result which is displayed on the user screen.
Selenium WebDriver Vs Selenium RC

The architecture of Selenium WebDriver is simpler as compared to Selenium RC.

The browser is controlled directly from OS (Operating System) level. The basic requirements to run a test script on WebDriver are:

  • An IDE (Integrated Development Environment) with any of the supported programming language like Java, C#, etc.
  • A Browser to execute the instructions generated by the test script.
Selenium WebDriver Vs Selenium RC

2. Speed

Selenium WebDriver performs faster than Selenium RC because it interacts directly with the browser without using any external proxy server. Selenium RC, on the other hand uses an intermediate RC Server to communicate with the browser.

Execution of test scripts takes more time in Selenium RC than WebDriver, since it uses JavaScript commands as instructions to the browser.

3. Object Oriented

Selenium WebDriver is purely object oriented API, whereas Selenium RC is less object oriented API.

WebDriver is entirely based on object oriented programming languages like Java, C#, etc.

4. Testing Mobile Applications

Selenium WebDriver supports OS (Operating System) for mobile applications like iOS, windows mobile and android. On the other hand, Selenium RC doesn't support testing of mobile applications.

5. Browser Support

Selenium WebDriver also supports headless HTMLUnit browser (Invisible Browser).

Note: HTMLUnit is an invisible browser which facilitates faster execution of tests because it involves no time in waiting for page elements to load.

Selenium RC doesn't support the headless HTMLUnit browser as it needs a real browser to work with.

Related Tutorial
Follow Us #