This tutorial describes Eclipse setup to use with Selenium. First download all the necessary packages:

  1. Download Java JDK from:
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Download Eclipse IDE for Java Developers :
    http://www.eclipse.org/downloads/
  3. Download and Install Selenium IDE firefox plugin(needs browser restart):
    http://seleniumhq.org/download/
  4. Download Selenium RC server and Selenium Client Drivers for Java:
    http://seleniumhq.org/download/

When all these packages are downloaded install first Java JDK. After install setup the Environment variables (java home, path).
After that extract Eclipse to folder C:\ECLIPSE

Extract Eclipse

After Eclipse, extract Selenium RC and Selenium Client Drivers to folder C:\SELENIUM

Extract Selenium

The next step is launching Eclipse(execute eclipse.exe from eclipse folder). After few seconds there will be displayed a window. Here You can create a Workspace. Click on Browse and select Your work location, make new folder (i.e. C:\ Selenium_JUnit) and click OK.

Workspace

Now You will be navigated to the Eclipse home screen. Click on Workbench

Workbench

The next step is Project creation. Click on File -> New -> Project. In wizard click on Java -> Java Project. Click on Next.

Java Project

On next screen fill the Project Name field, select “Use default JRE” and click on Finish.

Java Project

After click on Finish, the Project will be created. On next window click on Yes and Your project will be displayed at the left side.

Java Project

By expanding the project the there will be displayed default “src” folder and under this folder another folder “JRE System Library”. Here are listed the JRE system library files associated to the project.

Next step is configuring the Selenium Client driver to this Project. Right Click on created project at the left side. On new window select Build Path -> Configure Build Path. Click on Libraries tab and after click on “Add External JARs” button.
Select “Selenium Client Drivers” from “C:\SELENIUM” folder (Selenium Server JAR file should not be added) and Click on OK button. Now the build path is configured and the project is ready to be used.

Selenium

Right Click on “src” in package explorer and select New -> Other…- > Java- > Package and click on Next.

New Package Wizard

On next window You will create a new Java package. Enter Your package name into Name field and click on Finish.

New Package Wizard Finish

The package is created and listed in explorer at the left side under the folder src.
Next step is adding a java class. Right Click on “Package” in package explorer and select New -> Other… – > Java -> Class.

Java Class

Click on the Next button and on next window fill the Name field and click on Finish. The .java file is created.

Java Class Finish

Eclipse

    One Response to “Configuring Selenium RC using Eclipse”

  1. Joseph says:

    A brilliant step by step approach that leads to an expected end very well delivered. Thanks for the good job. Cheers

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>