Selenium RC components:
The Selenium Server, which launches and kills browsers.
Client libraries which provide the interface between each programming language and the Selenium RC Server.
Related Page: Sample Programs In Remote Control For Selenium
• Install the Selenium RC Server.
• Set up a programming project using a language specific client driver
The Selenium RC server is simply a Java jar file (selenium-server.jar), which doesn’t require any special installation. Just downloading the zip file and extracting the server in the desired directory is sufficient.
• Go to https://seleniumhq.org/download/.
• Under Selenium Server (formerly the Selenium RC Server) section, you can see the selenium server latest version.
• Click on download, it will be redirected to selenium server download page.
• Selenium server is a JAR file. Download selenium serverstandalone-2.ob3.jar
Create a Folder selenium in “C” drive.
Paste the selenium-server-standalone-2.ob3.jar file in that folder.
We need to be able to start and stop the Selenium Server.
We can do this at the command line:
Start: (Command line)
java -jar selenium-server-standalone-2.0b3.jar
The output should appear similar to the following screenshot.
Selenium IDE scripts may be run in Selenium RC by running them directly on the server with a -htmlSuite parameter.
Imagine that you have to run your Selenium IDE tests on a computer that doesn’t have Selenium IDE installed or you do not want to use Firefox with any add-ons installed. To do this, you will need to use Selenium Remote Control.
1. Record your test case using Selenium IDE
2. Play your test case using selenium IDE, it to make sure that your test case works.
3. Export your recording test case – as html file.
4. Create a test suite.
5. Run your exported html test case using selenium RC
Execute Selenium RC via command line against Firefox, Chrome and Internet explorer.
Create a folder in any drive – Ex: C:tests
Create a folder in any drive – Ex: C:results
We need to create two folders.
1. To save our test suite and test case. (tests)
2. To save results (results)
Using Selenium IDE record a test case and save it as .html in a tests folder. Make sure your test run correctly.
Related Page: How to Create test suites in Selenium
Create a Test suite:
RC operates on SIDE test suite files, rather than test case files. The test suite contains the file names of the test case(s) to run. A test suite file exists in the same directory as the test case file(s).
Create a test suite and save it in C:tests folder
To run our tests in Selenium Remote Control, we will have to use the –html suite argument. This tells Selenium to open the Test Suite that we created. We then need to tell it where to find the Test Suite and then where to write the results to. Our command in Command Prompt or a console window will be similar to the following snippet:
We can run our tests in any browser by using selenium RC.
java -jar selenium-server.jar -htmlSuite “*browser”
“https://www.example.com” “target folder” “results folder“
RUN THE ABOVE COMMAND FROM COMMAND PROMPT
Run this command from selenium directory.
C:s0elenium>java -jar selenium-server.jar -htmlSuite “*iexplore”
“https://www.google.com” “c:testsrun.html“ “c:resultsresults1.html”
Below is the screenshot of TEST RUNNER