0% found this document useful (0 votes)
316 views

Configuring Selenium RC and Basics

Selenium RC allows automated testing of web applications across browsers. It works by starting a Selenium server using Java, then writing tests in any programming language against the server using a browser driver. Some key steps are installing Java if needed, downloading and running the Selenium server JAR file, and addressing issues like using HTTPS URLs or setting the Firefox path if it is not found.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
316 views

Configuring Selenium RC and Basics

Selenium RC allows automated testing of web applications across browsers. It works by starting a Selenium server using Java, then writing tests in any programming language against the server using a browser driver. Some key steps are installing Java if needed, downloading and running the Selenium server JAR file, and addressing issues like using HTTPS URLs or setting the Firefox path if it is not found.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Why to use Selenium RC

Selenium Remote Control (RC) is a test tool that allows you to write
automated web application UI tests in any programming language against any
HTTP website using any mainstream JavaScript-enabled browser.

Steps to use selenium RC

Start command prompt in windows. This can be done by running


cmd.exe in the start button run.

Type java –version

If you get a version number (which needs to be 1.5 or later), you’re ready to start
using Selenium-RC. If not please follow steps below.
Installing Java on system

If java –version does not give you any version then there are two things that
could have happened.

Java is not installed on your system or the environment variables path is not set
right.

Support team or development team can help you on this.

1) Download latest jdk either 32 or 64 bit depending on the Operating system


and PC.

2) Install jdk

3) Restart the system and try typing java –version again and this might work

4) If still facing problems then need(Better getting help from IT Support or a


developer)

I. Follow the given steps below to set the PATH

II. After installing jdk, right click “My Computer” icon

III. Choose “Properties” from context menu

IV. Click “Advanced” tab and the click ‘Environment Variable’

V. In the Edit windows, modify PATH by adding the location of the class to
the value for PATH.

VI. If you do not have the item PATH, you may select to add a new variable
and add PATH as the name and the location of the class as the value. For
example, if you have installed jdk in C drive then path may be in the form
C:\Program Files\Java\jdk1.6.0_12\bin

VII. You will have to give your own path in which you have installed jdk.

VIII. Open Command prompt window, and run your java code.

It might look similar as given in snapshots below.


Now download Selenium-RC zip file from selenium downloads page.

Extract this folder in C or X drive.

Now go to the directory where selenium RC server is located and run


the below command.

java -jar selenium-server.jar

This will start selenium RC. If you want to end it you can use control-c or close
the command prompt.

If you find any problems you can open task manager and kill javaw process.

Using Selenium RC with https

Selenium RC normally will not work with https unless using some extra
configuration. To use a self-signed

Certificate since selenium loads the profile every time it will be difficult. So in
that case please follow the below steps.

1. Close down any running Firefox instances.

2. Start Firefox (the one you're going to run your tests with) with the profile
manager: firefox -ProfileManager

3. Create a new profile. You'll be prompted to choose a directory for the


profile. Put it somewhere inside the project where you're writing the tests.

4. Select the profile and run Firefox using it.

5. Browse to the HTTPS URL (with self-signed certificate) you're going to be


testing against.

6. Accept the self-signed certificate when prompted. This creates an


exception for it in the profile.

7. Close the browser.

8. Go to the Firefox profile directory.


9. Delete everything in the directory except for the cert_override.txt and
cert8.db files.

10. When you run your Selenium server pass a -firefoxProfileTemplate


/path/to/profile/dir argument to it. This tells Selenium to use your partial profile
(with certificate exceptions) as a basis for minting its new profile. So you get the
certificate exceptions, but without any of the other clutter you would get if you
used a whole profile.

So the command would look like this.

java -jar selenium-server.jar -htmlSuite "*firefox"


"https://qa.testing.tracesmart.co.uk"
"Y:\IT\Testing\testing\selenium\testing_reg_xstudio\HTMLSuite.html"
"Y:\IT\Testing\testing\selenium\testing_reg_xstudio\results.html"
-firefoxProfileTemplate "Y:/IT/Testing/testing/selenium/testing_reg_xstudio/
firefoxtemplate"

Firefox not found

If system is giving error saying Firefox path is not found. Check if firefox browser
is installed or not. If installed then please proceed with below steps. If firefox is
not installed then please download from Mozilla website.

We need to add this to path in windows system properties path variables. It is


advisable to take help from support or development team.

You can do this by following the below steps

1) Right click on My Computer Icon on Desktop.

2) Click on properties. This will open a new window and on left hand
navigation you can see Advanced system settings

3) Click on Advanced system settings

4) Click on Environment Variables

5) In the system variables select Path. Click edit

6) Add ;C:\Program Files (x86)\Mozilla Firefox

7) Click Ok and OK and OK on three times consecutively on three windows

8) Now restart computer(There might be another way of making it work)

9) The problem should disappear.

You might also like