Selenium WebDriver Installation Steps
Selenium WebDriver Installation Steps
We assume that you have already installed Java 8 or above on your machine and successfully
configured the environment variables required to run and compile java programs.
However, you can download the latest version of Java Development Kit (JDK) from the link given
below.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Advertisement
Once you have downloaded and installed the latest version of Java, you need to set path or
configure the environment variables in your system. Refer the link given below to understand how
we can set path and configure environment variables in Java.
https://www.javatpoint.com/how-to-set-path-in-java
• Click on the "Download Packages" link (you can also download the IDE directly from the
"downloads page" of Eclipse official website, but we will recommend you to navigate
through the download packages section and get "Eclipse IDE for Java Developers").
• It will redirect you to the "Download Packages" section. Scroll down through the webpage
and click on "Eclipse IDE for Java Developers".
• Go to the Download Links section and click on "Windows 64-bit". You can also select other
options to download based on the operating system you are currently working on.
• The downloaded file would be in zipped format. Unpack the contents in a convenient
directory.
• Double click on "eclipse" (.exe file).
• To configure the workspace, select a convenient directory where you want to keep all of
your Selenium trails and click on Launch button.
• Scroll down through the web page and locate Selenium Client & WebDriver Language
Bindings.
• Click on the "Download" link of Java Client Driver as shown in the image given below.
• The downloaded file would be in zipped format. Unpack the contents in a convenient
directory. It contains the essential jar files required to configure Selenium WebDriver in
Eclipse IDE.
4. Configure Selenium WebDriver
Now we will configure our Eclipse IDE with Selenium WebDriver. In simple terms, we will create a
new Java Project in Eclipse and load all the essential jar files in order to create Selenium Test
Scripts.
• Create a new Java Project from File > New > Java Project.
• Give your Project name as "Demo_Test", leave the other fields unaltered and click on
"Finish" button.
• Right click on the "src" folder and create a new Class File from New > Class.
• Click on "Java Build Path" option from the left hand side panel.
• Repeat the same steps for the jars which are present under the "libs" folder.
• Open "libs" folder, select all of the respective jar files and click on "Open" button.
• Once you get all the Selenium jar files in your Libraries tab, click on Apply and Close
button.
• The following image shows the directory structure of our "Demo_Test" test suite after
adding Selenium jars.
Hence, we have successfully configured Selenium WebDriver with Eclipse IDE. Now, we are ready
to write our test scripts in Eclipse and run it in WebDriver.