Selenium Web Driver Installation


Below soft wares are required to setup the Selenium WebDriver

Java Installation
1) Download JDK from below link
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2) Once downloaded and Installed the JDK, we need to set the Java environment variables Path
Set JAVA_HOME Variable In Windows.
a) Open the Control Panel -> System or Security –> System; the same thing can be done by right-clicking on ‘My Computer’ and choosing Properties.
b) Select ‘Advanced system settings‘.

image

c) Select Advance tab then click on ‘Environment Variables’ button

image

d) Environment variable window will open then select New button from System Variables

image

e) Set Variable name = JAVA_HOME.
f) Set Variable Value = Path where JDK is located. For me It is "C:\Program Files\Java\jdk1.7.0_51”. It depends on your own java installation
path and installed version.
g) Close all the dialog by clicking on OK buttons.
Set Path Variable for Java
Path variable is already existing in your Environment variable; we need to add java bin folder path in path variable.
Select the Path variable then click on Edit button
At End of the path variable string editor add the value ‘;%JAVA_HOME%\bin‘ or ‘;C:Program Files\Java\jdk1.7.0_51\bin‘.

image

Check whether java installed properly or not
a) Open command prompt
b) Run Command Java -version
c) It should show your installed java version
image

Eclipse IDE Installation
1) Download Latest Eclipse from Eclipse download Page
2) Make user that opt appropriate eclipse ID(32 bit or 64 bit windows OS).
3) Once downloaded, copy the folder and place it in the desired location on your file system.
4) Extract the zipped folder, a folder named as eclipse can be seen. The folder embodies all the required application and source files.
5) Launch the eclipse IDE using “eclipse.exe” residing inside the eclipse folder.
Note: Unlike other soft wares, no installation is required to use eclipse.

Selenium Web Driver Installation

For selenium installation Selenium Standalnone and Selenium client jar files are required.
1) Download Latest Selenium jar files from below link
http://www.seleniumhq.org/download/
2) Click on the download link for Java Client Library.

image

This download jar file comes as a ZIP file named "selenium-3.0.1.zip", extract the contents of this ZIP file on your local drive.This directory contains all the JAR files that we would later import on Eclipse.
3) Click on the download link for Selenium Standalone Server

image

How to associate Selenium client jar files to Eclipse IDE


1) Launch Eclipse.exe (where you are eclipse is located).
image

2) Click on OK button
3) Create a New Java Project, Select NewàJava Project
image

4) A New Java project windows appears
image

5) Enter Project Name in Project Name field then click on Finish.
6) Project Structure will be
image

7) Create a New Class by Right click on src folder, select New—> Class
image

8) Enter class Name in Name field
image

9) Right click on newly created Project , select Build Path –> Configure Build Path
image

Or Right click on newly created Project , Select Properties
image

Select java Build Path
image

The following screen will appear
Select Libraries tab then click on Add External JARs.. button
image

When you click on "Add External JARs.." It will open a pop-up window. Select the all JAR files you want to add.
image

Note Select all jar files under lib folder also
image

Then click on OK button, the project is look like ..
image

Note: we are done importing Selenium libraries into our project.

Comments