Home / Testing / Selenium-Webdriver-Setup


In this article, Let us discuss how to setup selenium webdriver and eclipse:

1. Install Java on your computer

( http://www.oracle.com/technetwork/java/javase/downloads/index.html )

2. Click on the download button.

3. Select radio button.

4. Select java that corresponding to your OS.

This JDK version comes bundled with java runtime environment(JRE), So you do not need to download and install JRE separately.

Once installation completed, open prompt and type “java”. If you find execution as below then go for next step.

5. Install Eclipse IDE

Download“EclipseIDEforjavadeveloper”( http://www.eclipse.org/downloads/ )

Select version 32bit or 64bit.

6. You should be able to download an exe.file named “eclipse-inst-win6”

7. Download and install the eclipse. A new window will be open. Click eclipse IDE for java developer.

8. After that a new window will be displayed which click button marked 1 and change path to “C:\\eclipse”. Post that click on install button marked2.

9. After successful installation, A window displayed as shown below click on lunch.

10. Download selenium java standard server. And you can also download selenium java client driver.

This download comes as a ZIP file named “selenium-2.25.0.zip”. For simplicity, extract the contents of this ZIP file on your C drive so that you would have the directory “C:\selenium-2.25.0\”. This directory contains all the JAR files that we would later import on Eclipse.

Configure Eclipse IDE with WebDriver

Launch the “eclipse.exe” file inside the “eclipse” folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:\eclipse\eclipse.exe.
When asked to select a workspace, just accept the default location.

Create a new project through File > New > Java Project. Name the project as “newproject”

A new pop-up window will open enter details as follow
1. Project Name
2. Location to save project
3. Select an execution JRE
4. Select layout project option
5. Click on Finish button

In this step,
1. Right-click on the newly created project and
2. Select New > Package, and name that package as “newpackage”.

A pop-up window will open to name the package,
1. Enter the name of the package
2. Click on Finish button

Create a new Java class under newpackage by right-clicking on it and then selecting- New > Class, and then name it as “MyClass”. Your Eclipse IDE should look like the image below.

When you click on Class, a pop-up window will open, enter details as
1. Name of the class
2. Click on Finish button

This is how it looks like after creating a class.

Now Selenium WebDriver’s into Java Build Path
In this step,
1. Right-click on “newproject” and select Properties.
2. On the Properties dialog, click on “Java Build Path”.
3. Click on the Libraries tab, and then
4. Click on “Add External JARs..”

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

After selecting jar files, click on OK button.

Select all files inside the lib folder.

Once done, click “Apply and Close” button


Add all the JAR files inside and outside the “libs” folder. Your Properties dialog should now look similar to the image below.

Finally, click OK and we are done importing Selenium libraries into our project.

About Coepd LLC

Leave a Reply

Your email address will not be published. Required fields are marked *

Watch Dragon ball super