QA Revolution

Learn How to Install Java and Selenium WebDriver

Install Java and Selenium WebDriverSteps to install Selenium WebDriver

Here are the steps needed to install the various components needed for Selenium WebDriver.



Step 1: Install Java

Download and install the Java Software Development Kit (JDK) here

install Java jdk

Select and download the correct JDK version for your operating systeminstall selenium webdriver



Once this installation has been downloaded and installed, open your command prompt and type java -version to confirm the correct Java version has been installed.

confirm java version

Step 2-Install Eclipse

Download the latest version of Eclipse here.

download eclipse ide

Once the file has been downloaded, double click on the file to install Eclipse.  Select Eclipse IDE for Java Developers.

install eclipse IDE

Click on the Install button.

install selenium webdriver

Accept Terms and Conditions

accept terms

The installation will begin.

When the install is complete, click on the Launch button.

launch eclipse

Step 3-Download Selenium Java Client WebDriver

Download the Selenium Java Client WebDriver here.

selenium java client

The download file will come as a .zip file.  You can create a folder on your computer called: C:\Selenium and extract the contents of the download there.  This will contain all the needed files that will be used to configure Selenium.  Once you extract the files it will look like this:

selenium webdriver install

Step 4-Configure Eclipse with Selenium WebDriver

Go to the location where you extracted the zip file.  It will contain an executable called eclipse.exe.  You might also see a shortcut on your desktop that looks like:

eclipse shortcut

Double click on the Eclipse shortcut and it will launch Eclipse. You can use the location listed, and click on Launch.

launch eclipse

Once the screen is launched, click on Create a New Java Project

create java project

The following window will appear.  For the project name you can call it myfirstproject.  You can use the other defaults listed and click the Finish button.

learn selenium

The following window will appear.  Click on the Create button.

The following screen appears:

how to install selenium

Right click on myfirstproject and select New and then Package.

setup selenium

The following window will appear.  Name the new package mypackage and click on the Finish button.

selenium automation

Right click on myfirstpackage and select New then Class

selenium automation jar

The following window will appear.  Under name enter myfirstjavaclass and click the Finish button.

install selenium webdriver

For the next step, right click on myfirstproject and select Properties

selenium java webdriver

On the properties window, select Java Build Path then Libraries tab then Add External JARS…

java selenium learn here

The JAR Selection window will appear.  Go to the location where you installed the Selenium files on your computer.  Mine is installed at: C:\Selenium.

how to configure selenium webdriver

Double click on the libs folder

selenium configuration settings

Select all the files and click the open button.

selenium files

You will see all the files you selected displayed.  Click on Add External JARS.. button again

how to configure selenium webdriver

The JAR Selection window will appear.  Select all files there and click on Open.

setup selenium webdriver

On the Properties window, click on the Apply and Close button.

selenium web automation

You will now see the Referenced Libraries displayed.

selenium webdriver files


The Selenium WebDriver configuration is finished.  I hope this information has been helpful.  Don’t forget when you create a new project, you will need to import these files again.  In order to run your scripts you will need to determine which browsers you plan on using.

You can click here to learn how to setup the different browsers.