Google+

Selenium RC - The outdated legend of Selenium

Selenium RC used to be the leader in the market for a long period of time until Selenium WebDriver is introduced into the market in 2006. Understanding Selenium RC will help us in understanding the power of the latest Selenium WebDriver. Selenium RC stands for Selenium Remote Control and is nothing but an API. Before understanding Selenium RC, we have to first understand the term API.



API stands for Application Programming Interface. API in simple terms is nothing but a group of functions and wont have any Graphical User Interface. Selenium RC is also an API and has its own set of functions which help us in automating the applications. For example, Selenium RC’s API has a function called click( ), which will help us clicking on the GUI elements on the Web Applications say Buttons, Links etc. Selenium guys did all the hard work and have already written the code for the functioning of methods like click( ) and provided them in the form of an API. We just need to use the click( ) method from the API on the GUI elements like Buttons and Links, to perform operations on them as part of Selenium Automation.

But Selenium RC is an outdated now, almost all projects now moved to a new API known as WebDriver. Since WebDriver API is the latest API of Selenium, we can simply ignore using Selenium RC. Even though Selenium RC is outdated, the below details of Selenium RC are explained for General Knowledge sake.

Server is required for executing the automation scripts

Selenium Remote Control Server is required for executing the automation scripts as shown below:



Selenium RC Server acts as the middle man between ‘Selenium RC Automation Scripts’ and the Browser as explained below:

Need to launch ‘Selenium RC Server’, as Selenium RC Server acts as the middle man between ‘Selenium RC Automation Scripts’ and the Browser. On executing the ‘Selenium RC Automation Scripts’, ’Selenium RC Server’ first injects a JavaScript program called Selenium Core into the browser. Once the Selenium Core is injected into the Browser by ‘Selenium RC Server’, Selenium Core injected into the browser will start receiving instructions by ‘Selenium RC Server’ from your test program. On receiving the instructions, Selenium Core will execute the instructions on the residing browser using the JavaScript commands. The browser will accept the instructions from Selenium core and the response of the executed instructions will be received by Selenium RC Server. Selenium RC Server will receive the responses of the browser and then displays the results. Selenium RC Server will then fetch the next instructions from the Automation scripts and repeats the same cycle. The below diagram depicts the same.


Conclusion:

Selenium RC is an API and has rocked the automation world for good amount of time. It got retired in the year 2006, when the new API known as WebDriver got introduced into the market. The main drawback of Selenium RC is its 'Selenium RC Server'. Selenium RC Server is required to execute the Selenium RC Automation scripts and hence its mandatory to launch Selenium RC Server every-time for executing the Selenium RC Automation scripts. 

No comments: