Search code examples
seleniumwebdriverselenium-gridselenium-rcselenium-server

What is the difference between Selenium Server and Selenium RC?


Selenium Webdriver - For interacting directly with browser

Selenium RC - Interacts with browser through a Server

If i need to test remotely using Web-driver, i need to use Selenium Server

  1. So when we say Selenium Server in third point, does it mean then the same server used by Selenium RC?

  2. Is selenium server already included with selenium RC? If need to do automation using selenium RC, do i need to download Selenium Server separately?


Solution

  • Selenium Remote Control (RC) and Selenium WebDriver both are test automation tools supporting different programming languages but come with some critical differences.


    Selenium RC

    Till a couple of years back Selenium RC was an important component in the Selenium test suite. It was the testing framework that enabled 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 comprised of two parts:

    • Client libraries for the preferred Language Binding Art.
    • A server that launches and destroys web browsers automatically.

    SeleniumRC

    Selenium RC’s architecture was a bit complicated as:

    • Developer/QA personal needed to install and launch a separate application called Selenium Remote Control Server before running test scripts.
    • The Selenium RC server acted as a mediator between the browser and Selenium commands.

    The sequence of execution was:

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

    But there were limitations as follows:

    • Selenium RC Server's architecture was pretty complicated.
    • Execution of test scripts was time-consuming as Selenium RC uses JavaScript commands as instructions to the browser which resulted in slow performance.
    • API’s were less object-oriented.
    • There was no support for headless browsers.

    All these limitations of Selenium RC Server led to the development of the new robust automation framework Selenium WebDriver.


    WebDriver

    From Selenium perspective, the WebDriver Interface is similar like a agreement which the 3rd party Browser Vendors like Mozilla, Chrome, Internet Explorer, Safari, etc have to adhere and implement the same. This would in-turn help the end-users to use the exposed APIs to write a common code and implement the functionalities across all the available Browsers without any change.


    This usecase

    To execute your testcases:

    • Locally: Selenium Client (jars) which is a bunch of API's would suffice your need.
    • On Remote machines(Selenium Grid): Selenium Server would solve your purpose.

    You can find a relevant discussion in What is difference between Selenium Standalone Server and Java selenium Jar files