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.
? Install the Selenium RC Server.
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 http://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.jarCreate 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.jarThe output should appear similar to the following screenshot.
Stop: (Browser)http://localhost:4444/seleniumserver/ driver/?cmd=shutDownSeleniumServer
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.
Getting Started with Selenium/ Selenium RC steps
1. Record your test case using Selenium IDE2. 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.
Execute Selenium RC via command line against Firefox, Chrome and Internet explorer.Create folders:Create a folder in any drive ? Ex: C:testsCreate a folder in any drive ? Ex: C:resultsWe 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.
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 folderTo 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.Synatx:java -jar selenium-server.jar -htmlSuite ?*browser??http://www.example.com? ?target folder? ?results folder?RUN THE ABOVE COMMAND FROM COMMAND PROMPTRun this command from selenium directory.Example:C:s0elenium>java -jar selenium-server.jar -htmlSuite ?*iexplore??http://www.google.com">http://www.google.com">http://www.google.com? ?c:testsrun.html? ?c:resultsresults1.html?Below is the screenshot of TEST RUNNER