1. Download & Install Selenium WebDriver (with Screenshots)

— 4 min read

Download & Install Selenium WebDriver (with Screenshots)

Selenium WebDriver is an automated tool that you can use for web application testing. The Selenium WebDriver library is supported by programming languages such as Java, Python, C# and so on. This article will demonstrate how to download & install Selenium WebDriver for Java & JavaScript.

Download & Install Selenium WebDriver for Java

To connect Selenium WebDriver in Java, you have to follow the three steps below.

  1. Java JDK
  2. Eclipse IDE
  3. Selenium Driver Files

Install Java SDK

The first step is to install Java JDK which you can download from the official Oracle website. The latest version currently available is Java SE 14 which you can download here.

Click on JDK Download to download the file onto your machine.

Once you download the file start the installation.

After you complete the installation prepare environmental variables – only applicable for windows operating systems. Go to system properties and click on Environmental Variables, then click New and give the bin path from the Java installation files.

After setting the environmental variable, to confirm that the installation is a success, open the command prompt and type ‘java’. You will see the module parameters and that’s your confirmation for a successful installation.

Install Eclipse IDE

The second step is to install an IDE for Java development - Eclipse. You can download the Eclipse IDE from the official eclipse website. As the below image shows, click the download file and save the executable installation file in your device. Then install it.

When installing make sure you select ‘Eclipse IDE for Java Developers’ and follow the normal installation process.

You can Launch the Eclipse IDE once you complete the installation.

Install Selenium Java Client WebDriver

The final step is to install the Selenium WebDriver for Java. You can download Selenium Web client from Selenium official website.

Selenium is available for other programming languages as well. We will download it for Java and save the file in our device – it will be a zip file.

 

Extract the zip file to any location for future access.

Now let’s see how to import the Selenium WebClient to Eclipse IDE. Open Eclipse IDE, select Launch with default workspace location.

 

Create a new Java Project and give a suitable name.

 

Once you create a new project, right-click on the project and create a new package for it and give a suitable name.

 

After you create the package, right-click on the package and create a new class with a suitable name.

 

Now, right-click the project and select properties and click on the Libraries tab after selecting Java Build Path on the left.

 

Click on Add External JARs.. and navigate to the path where you extracted the Selenium files. Select all the files inside the libs folder and outside.

 

You can see the files that you selected in the navigation panel as well. Now click on Apply and Close. That’s it! All the selenium WebClient applications can be used with Java.

 

 

Download & Install Selenium WebDriver for JavaScript

First, you have to install NodeJs before installing the Selenium WebDriver for JavaScript. You can download the NodeJS installation file from its official website.

 

 

Start the executable file to install NodeJS in your device.

 

Once you complete the installation, you have to set the environmental path for the NodeJS installation files. Open System Properties and click Environmental Variables. Click on the path and select New, then give the path location for the NodeJS installation file.

 

Now it’s time to install the Selenium WebDrive for JavaScript.

 

Installing Selenium WebDriver for JavaScript is simple which can be done with one line command. Open the command prompt and type npm install selenium-webdriver. That’s it! You have installed the Selenium WebDriver for JavaScript.

 

Conclusion

We hope that the installation guidelines with the screenshot helped you to install Selenium WebDriver for Java & JavaScript. However, the user does not stop here. You will have to use this application with your browsers and when you start that task, you might want to download additional components and install as well. Good Luck!