Sat 19 Jul 2008
By now you should feel fairly comfortable creating tests in the IDE and be able to run them in either the IDE or Selenium Core. In this tutorial we are going to learn how to setup Selenium Remote Control and use the HTML Test suites that you created during the record and replay tutorial.
Make sure that you have downloaded Selenium Remote Control from http://selenium-rc.openqa.org .
- Once you have downloaded the zip file from the site you will need to unzip it and place it in a folder that is easy to get to.
- You will need to download and install the latest Java JRE on your system. You can find this at http://java.sun.com .
- Once you have installed it, open up a command prompt and run java -version. It should look something like the image below.
- Navigate to the directory where you put Selenium Remote Control in step 1.
Type in the command java -jar selenium-server.jar and press enter. You should
see the following -
- Well done, you have managed to get Selenium Remote Control working! The next thing that we need to do is get some tests running through it.
- In the Record and Replay Tutorial you were taught how to create your scripts in Selenium IDE and how to create a Test Suite so that you can group your tests. If you have forgotten or just not 100% sure how you did it last time I suggest working your way through that tutorial again.
- For the next step you will need a HTML Test suite to drive Selenium Remote Control. I have created a downloadable zip file with test scripts and a test suite for you to use. If you haven't been able to create your own test suite download the zip. Expand the zip into a folder that is easy to get to. For this tutorial the test suite will be unzipped to c:\testsuite\
- We are going to use the HTMLSuite commands of the Selenium Remote Control. This
allows you run your Selenese Test Suites as is. The command should look like
java -jar selenium-servre.jar -htmlsuite <browser> <url> <path to testsuite>
<where to store results> .
Browser could be : -*firefox
The path to the test suite and the results file should be a full path.
Here is an example command; java -jar selenium-server.jar -htmlsuite *iexplore http://www.theautomatedtester.co.uk c:\testsuite\testsuite.html c:\testsuite\results.html
- When it starts running it should look like the image below