How does Selenium RC work?


Selenium RC or Remote Control is the initial version of Selenium which is also referred to as Selenium

1. RC uses a JavaScript Program called Selenium core which controls the browser. It works by intimating the user action as commanded by the JavaScript commands but that does not enforce user to write automated test cases in the only JavaScript, let’s see how does RC make that happen.

The above diagram depicts the brief architecture of the Selenium RC.

Selenium RC contains the following components −

Selenium Server − It acts as the central processor for your entire application. It receives the script for the test cases to be executed, interprets the command and reports back the test execution result. RC server binds the Selenium Core and automatically injects the script in the browser. All these actions are performed only after the test program has executed the browser using a client library API. The server works by receiving selenese commands which are transmitted over HTTP network in the action type as GET and POST, this makes us use any programming language to be used to pass these commands to the server.

Client Libraries − As the name suggests, client libraries are the programming language-specific libraries which are used by testers to create the test scripts. These libraries are different for each language. They provide functions, which execute the selenium command. Each of selenese commands has corresponding functions already defined.

These libraries take the selenese commands and pass it to the Server as described above for execution on the Application under test.

Let’s find it step by step how it works −

  • Before starting any test we need to launch the Selenium RC server.

  • RC server is the mediator between Selenium commands and browsers. It injects Selenium Core(JavaScript Program) into a web browser when the actual testing is triggered.

  • Selenium Server communicates with the running test client and drives the browser after receiving instruction by RC Server.

  • Client tests send commands that the server interprets in order to drive the browser

  • The browser receives the instructions from Selenium Core and relays its response to the Selenium RC Server.

  • Using the response received by the RC Server, the test results are displayed to the user.

Updated on: 01-Jul-2020

380 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements