Steps 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
Select and download the correct JDK version for your operating system
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.
Step 2-Install Eclipse
Download the latest version of Eclipse here.
Once the file has been downloaded, double click on the file to install Eclipse. Select Eclipse IDE for Java Developers.
Click on the Install button.
Accept Terms and Conditions
The installation will begin.
When the install is complete, click on the Launch button.
Step 3-Download Selenium Java Client WebDriver
Download the Selenium Java Client WebDriver here.
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:
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:
Double click on the Eclipse shortcut and it will launch Eclipse. You can use the location listed, and click on Launch.
Once the screen is launched, click on Create a New 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.
The following window will appear. Click on the Create button.
The following screen appears:
Right click on myfirstproject and select New and then Package.
The following window will appear. Name the new package mypackage and click on the Finish button.
Right click on myfirstpackage and select New then Class
The following window will appear. Under name enter myfirstjavaclass and click the Finish button.
For the next step, right click on myfirstproject and select Properties
On the properties window, select Java Build Path then Libraries tab then Add External JARS…
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.
Double click on the libs folder
Select all the files and click the open button.
You will see all the files you selected displayed. Click on Add External JARS.. button again
The JAR Selection window will appear. Select all files there and click on Open.
On the Properties window, click on the Apply and Close button.
You will now see the Referenced Libraries displayed.
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.