Friday, January 23, 2015

Difference between Selenium WebDriver & Selenium RC

Difference between Selenium WebDriver & Selenium RC

Below are few differences between Selenium WebDriver and Selenium RC:

1. With Selenium 1.x the communication between the test case and the Selenium RC server goes over the network (your test commands are translated into HTTP requests being sent to the Selenium RC server). Potentially the Selenium RC server can be running on another machine than where the actual test is running. The Selenium RC server then translates the commands received over HTTP to JavaScript calls and injects them into the target browser.

Selenium now offers a different method, using WebDriver, which controls the browser directly using the browser’s native API. So it no longer requires a complex (internal) setup as with Selenium RC that Selenium 1.x used. Using Selenium you can directly control the browser without having the need for the Selenium RC server. You simply select the appropriate driver via the API, depending on the browser you want to use. [Source: Pro Spring MVC: With Web Flow by Colin Yates, Seth Ladd, Marten Deinum, Koen Serneels, Christophe Vanfleteren]

2. When WebDriver was released there were significant differences between it and Selenium RC, though they sat in the same software niche of an API for browser automation. The most obvious difference to a user was that Selenium RC had a dictionary-based API, with all methods exposed on a single class, whereas WebDriver had a more object-oriented API. In addition, WebDriver only supported Java, whereas Selenium RC offered support for a wide-range of languages. There were also strong technical differences: Selenium Core (on which RC was based) was essentially a Javascript application, running inside the browser's security sandbox. WebDriver attempted to bind natively to the browser, side-stepping the browser's security model at the cost of significantly increased development effort for the framework itself. [Source]

3. WebDriver’s API is more Object Oriented than the original Selenium RC API. This can make it easier to work with. [Source]

Apart from above differences you can go through the below links for more differences between Selenium WebDriver and Selenium RC:

1. Difference between Selenium RC and WebDriver. [Link]
2. Introduction to WebDriver & Comparison with Selenium RC. [Link]
3. Difference between Selenium RC and Selenium Web Driver. [Link]
4. Difference between Selenium RC and Selenium Web driver. [Link]
5. Selenium Tutorial-Difference between IDE, RC and Webdriver. [Link]
6. Difference between Selenium RC and Webdriver. [Link]