Monday, January 28, 2013

How to Configure Selenium Jar files to Eclipse Editor?

To begin working with selenium and Java, we need to have below software's in our machines to develop selenium Tool.

1. Download JRE – 1.6 or above and install – Use the below link to download
http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Download Eclipse 3.5 or above and install – Use the below link to download http://www.eclipse.org/downloads/
Depends on what kind of server existed in your Machine download the versions, either 32 bit or 64 bit.

Use below information to identify your computer is 32 bit or 64 bit server.

3. Download Selenium Jars using the link - http://seleniumhq.org/download/

Note: If the displayed version doesn't exists take the latest one(Currently 2.28.0)
Once all the downloaded files are installed(which are .exe files). Please follow below steps to integrate Selenium Jars with java

Selenium Integration Steps:

1.       Double Click on Eclipse Editor which is installed in your machine. Eclipse Editor asks for Work-space where project related information stores.
2. Identify a location and create a new Work-space in one of the directory (D, C, E, F etc…)

3. Provide the work-space path in Eclipse Work-space and click on OK Button. It Opens Eclipse Home Page. Click on Work Bench on Eclipse Home Page.
4. Click on File-> New -> Project to create new Java Project in Eclipse Editor
5.       Select Java Project in the Opened Wizard and Click on Next Button
6. In Create Project Wizard, Enter Project name, verify the location is correct or not?

7. In JRE block use an execution environment JRE radio button and click on configure your JRE’S, to import Installed Java 1.6/ above from the installed location, if its not configured by default.


8. If all configurations are done Click on Finish button.
9. Once the Project is created in Eclipse Editor, the location of the project creates with an .metadata folder 
10.  Right Click on Project and Click on Build Path and select Configure Build path
11. Java Build Path Wizard will open, Select Libraries tab and click on Add External JRE’s button
12. Unzip extracted downloaded selenium folder and select selenium-java-2.25.0, selenium-java-2.25.0-srcs jars in the folder and all Jars in libs folder
13. All imported JAR's will display as below in External Libraries Wizard.
14.   Click on OK Button, it will import all JRE's to Eclipse Editor in Referenced Libraries

Now selenium tool is ready for automating using Eclipse editor. I hope you got an idea, how to configure Selenium with Eclipse.