×

Selenium WebDriver installation

Installation Steps of Selenium WebDriver

In this tutorial, we will see the process of selenium webdriver installation.

Selenium WebDriver installation process is done in four Stages:

  • Java Installation (version 8 or higher version)
  • Eclipse  Installation and configuration
  • Download Selenium WebDriver
  • Import web driver jar into the Eclipse project.

Java Installation

We expect that you have already installed Java (version 8 or above) on your system and configure the environment variables required to run and compile the Java programs successfully.

Note: To use Selenium 3, we will need to install Java 8 in our system.

For downloading the latest version of the Java Development Kit (JDK), you can refer the following link: https://www.oracle.com/technetwork/java/javaSE/downloads/index.html

While clicking on the above link, we will see the below screen, where we have to download the JAVA SE 8u22 version.

Remember one thing that downloads only JDK.

Installation Steps of Web Driver

Once you downloaded and installed the latest version of Java, and to set the path or configure the environment variable in your system, we will move to our next stage, i.e.

Eclipse Installation and configuration

To install Eclipse following steps are as follows:

Installation Steps of Web Driver 1
  • After click on the Download Packages section, select Eclipse IDE for Java Developers because Eclipse comes with multiple tools like Java, java bean, C++, and PHP.
  • And select one of the options between Window 64 bit, macOS 64 bit, and Linux 64 and download it.
  • And we have window 64-bit compatibility in our system, so we click on the window 64 bit.
Installation Steps of Web Driver 2
  • The downloaded file comes up with the zipped format.
  • Extract/unzip the contents in the desired directory.
Installation Steps of Web Driver 3
  • Then, double click on eclipse [.exe file].
Installation Steps of Web Driver 4
  • To configure the workspace, select any available directory where we want to save all of our Selenium test scripts.
  •  After that, click on the launch button.
Installation Steps of Web Driver 5
  • The default interface of Eclipse IDE is launched, which is as shown below:
Installation Steps of Web Driver 6

After that, we will download selenium webdriver for java which is shown below in the next phase

Download Selenium WebDriver Java Client

  • Go to the Google search to download Selenium.
  • Click on the first link to navigate the Selenium community.
Installation Steps of Web Driver 7
  • After that, click on the download button.
Installation Steps of Web Driver 8
  • Now scroll down your web page and go to the selenium client & web driver language bindings and click on the download button for java client driver, which is shown in the below screenshot:
Installation Steps of Web Driver 9
  • Then, the downloaded file comes in the zipped format.
  • Unzip the folder in the desired directory.
  • It contains all the jar files which are required to configure Selenium WebDriver in Eclipse IDE.
Installation Steps of Web Driver 10

Configure Selenium WebDriver

Now we will configure Eclipse IDE with Selenium WebDriver.

  •  First, we will create a new Java Project in Eclipse and load all the jar files to develop Selenium Test Scripts.
  • Open Eclipse IDE with a new workplace.
  •  To create a new java project, click on fileà newà java project.
Installation Steps of Web Driver 11
  • Give your Project name as new_test, leave the other fields as it is, click on the Finish button.
  • The new Java project will be created with the following directories.
Installation Steps of Web Driver 12
  • Now we have to create a package for a newly developed project.
  • Right-click on the project and select a new>package and name the package as testpackage.
Installation Steps of Web Driver 13
  • After that, create a new Java class under testpackage by right-clicking on it.
Installation Steps of Web Driver 14

When you click on Class field, a pop-up window will open, then enter details as

  • Name of the class
  • Click on the Finish button.
Installation Steps of Web Driver 15

Note: Selenium Test Scripts always are written in .class file in Java. Here the project new_test act as a test Suite that may contain one or more Selenium test cases/test scripts.

  • After successfully creating a class, the below window appears:
Installation Steps of Web Driver 16
  • Now, we add the Selenium jar files in the Test Suite (new_test).
  • Right-click on the new_test folder and click on Properties field.
Installation Steps of Web Driver 17
  • Then click on Java Build Path from the left-hand side panel.
Installation Steps of Web Driver 18
  • And then move to Libraries field, and click onthe Add External JARs button.
Installation Steps of Web Driver 19
  • It will locate you to the directory where we have downloaded the Selenium jar files, select the individual jars, and click on the Open button.
Installation Steps of Web Driver 20
  • Follow the same process to upload the jars of the libs folder.
  • Open the libs folder and select all the respective jar files and click on the Open button.
Installation Steps of Web Driver 21
  • After that, we will get all the Selenium jar files in our Libraries field, then click on Apply and Close button.
  • Below snapshot shows the directory structure of our new_test Test suite after adding Selenium jars files.
Installation Steps of Web Driver 22

Hence, we have successfully installed the Selenium WebDriver with Eclipse IDE. Now we can write our test script in eclipse and run through web driver.

 

 


Related Topics

Selenium WebDriver installation

Installation Steps of Selenium WebDriver In this tutorial, we will see the process of selenium webdriver installation. Selenium WebDriver installation process is done in four Stages: Java Installation (version 8 or higher version) Eclipse...

4 minutes read.

Selenium Tutorial

What is Selenium? Selenium is a functional testing tool and compatible with the non-functional testing tools also. Selenium is free and does not require any licensing. Functional tests script executed by...

6 minutes read.

Id Locator in Selenium IDE

Id Locator Id locator is used to find the web element by the help of id of that element because ID is likely to be unique for each web element. Target Format: Id=id of the...

2 minutes read.

Selenium WebDriver- Checkbox handling

Selenium WebDriver- Checkbox handling In this tutorial, we will be learning about handling the checkbox in selenium WebDriver. Let us take one example to give you a better understanding of Checkbox handling,...

4 minutes read.

Selenium WebDriver- Microsoft Edge Browser

Selenium WebDriver- Microsoft Edge Browser: In this tutorial, we will learn how to launch the Microsoft Edge browser in the Selenium WebDriver. Before we start automating our test script with Microsoft Edge...

4 minutes read.

WebDriver Interface | Class Diagram

WebDriver interface/class diagram: The interface of WebDriver includes the following stages, which is as follows: Search Context Web driver Remote web driver Driver class Search Context  The first interface of the web driver class is search Context,...

2 minutes read.

Selenium-IDE Login test

Login test for Selenium-IDE Now we are learning, how to create a Login/sign-up Test case in Selenium IDE. For our testing purpose, we are going to test the login page provided by...

2 minutes read.

Selenium WebDriver Characteristics

Characteristics of Selenium WebDriver Some of the essential characteristics of Selenium WebDriver are as follows: Multiple Operating System Support Selenium Webdriver supports multiple operating systems like: Desktop OS: Window, Linux, and macOS Mobile OS:...

2 minutes read.

Characteristics of Selenium IDE

Characteristics of Selenium IDE Selenium IDE is separated into different parts, each having their features and functionalities. The seven various components of Selenium IDE are as follows: MENU BAR: The menu bar is...

3 minutes read.

Selenium Testing

Selenium is a functional testing tool and compatible with non–functional testing tool. Selenium is free and not required any licensing. There are specified types of testing that can be automated using Selenium:-   Functional Testing: Checking every component...

3 minutes read.

Selenium WebDriver - Navigation Controls Commands

Navigation Controls Commands in Selenium WebDriver WebDriver is used to hold the browser history and perform browser navigation operations like, back, forward, and refresh. Whenever a WebDriver launches a browser, all...

5 minutes read.

Selenium WebDriver-CSS Selector: Tag Class and Attribute

Selenium WebDriver-CSS Selector: Tag, Class, and Attribute We will locate the web element with the help of Tag, class, and attribute CSS selector locator in this section of the tutorial. Where Tag,...

5 minutes read.

Selenium Assertion

Selenium Assertion: In this section, we will learn about the Assertion in Selenium WebDriver. An Assertion is a feature available in TestNG, which is used to verify the expected result of...

7 minutes read.

Operational Controls Methods in Selenium WebDriver

Operational Controls Methods The Operational controls are used to perform all the actions on the web elements like click on the button, pass the value in the text box, and click...

4 minutes read.

First test case of Selenium-IDE

First Test Case of Selenium-IDE: In this part, we are discussing how to create a basic test case in Selenium-IDE: The entire test script execution process in Selenium -IDE can be divided...

4 minutes read.

Selenium WebDriver – Web Element Controls

Selenium WebDriver – Web Element Controls A web element is an interface that is implemented by a remote web element class. The Web element control can be used to perform the data...

1 minute read.

Xpath locator in Selenium IDE

X PATH LOCATOR: Xpath is used to identify the element using any attribute or visible test. Syntax for X PATH:- //html tag [@attribute=’value’] e.g. - //div [@class=’label’]                    OR //html tag [text () =’Visible Text’] e.g.-//div [text...

2 minutes read.

Selenium WebDriver-CSS Selector locator

Selenium WebDriver-CSS Selector locator A CSS selector is used to identify the web element based on their “# id” and “. Class”, Html tags, and attributes. A CSS stands for Cascading Style...

1 minute read.

Selenium Wait

In this tutorial, we will understand how we can avoid synchronization issues while executing the test script in a selenium WebDriver. Before going further in this tutorial, first, we will understand that...

10 minutes read.

WebDriver-Id Locator

WebDriver-Id Locator: The Id Locator is used to identify any web element in UI with the help of the ID attribute. The First preference is always goes to ID locator while inspecting...

4 minutes read.