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:
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.
- Subsequently, Selenium Core will start receiving the instructions (Selenium commands) from the RC Server.
- 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.
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 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.
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.