Download Selenium WebDriver JAR Files and Set Up in Eclipse

This guide will show you how to download Selenium WebDriver JAR files and configure Eclipse IDE for writting Selenium test scripts.

Download Selenium WebDriver JAR Files

If you’re wondering how to download Selenium WebDriver JAR files, the process is simple and doesn’t require any installation. Selenium provides a bundle of JAR files that you can configure directly in your Java project using Eclipse IDE. You can visit the official Selenium website and download the latest Selenium WebDriver Java Client to get the required JAR files for Eclipse configuration.

Follow the step-by-step guide below to download and set up Selenium WebDriver JAR files for your automation framework.

Download Selenium WebDriver Java Client from the official Selenium website
Download Selenium Jar Files. Image by Author.
  • Locate the Java Section: Scroll down to the “Selenium Clients and WebDriver Language Bindings” section.
  • Download the Java Client: Under the Java heading, click on the link for the latest stable version (e.g., “4.31.0”) to download the selenium-java-.zip file.
  • It will download a .zip folder as shown in the image given below.
Downloaded Selenium WebDriver Java client ZIP file contents for Eclipse setup
Downloaded a folder of Selenium Webdriver Java jar file Zip folder. Image by Author.
  • Extract the ZIP File: Once downloaded, extract the ZIP file to a directory of your choice. The extracted folder will contain:
    • libs folder with supporting JAR files
    • Two main Selenium JAR files​
    • CHANGELOG, LICENSE, and NOTICE files
Unzipped Selenium WebDriver package with JAR files for Eclipse project setup

These files are essential for configuring Selenium WebDriver in your Java project.​

Set Up a Selenium Project in Eclipse

Once you have selenium .jar files, you can configure Eclipse to set up a selenium project as below.

Create a Java Project in Eclipse

  • Start Eclipse.
  • Go to File menu → Select New → Java Project. It will open a dialog to create a new Java project.
Creating a new Java project in Eclipse IDE for Selenium WebDriver setup
  • Set project name = Sample Project, and click on the Finish button.
Step to create a Java project in Eclipse for Selenium automation scripts
  • A new project named Sample Project will be added in Eclipse as shown in the image given below.
Eclipse IDE showing newly created Java project named 'Sample Project' in Project Explorer

Create a Package Under the Project

  • Right-click on the project folder.
  • Select New → Package.
Selecting New → Package option in Eclipse IDE to create a new Java package
  • Set package name = testPackage and click on the Finish button.
Eclipse IDE showing new Java package creation with package name set to 'testPackage'

A new package testPackage will be added under the src folder of the project, as shown in the image given below.

Eclipse Project Explorer showing newly created Java package named 'testPackage'

Add a Class File

Now you can add a class file under the newly added package.

  • Right-click on the package.
  • Select New → Class
Eclipse IDE context menu showing New → Class option to create a Java class
  • A new dialog to set the class file name will be displayed.
  • Set name = SampleTest and select the public static void main(String[] args) checkbox.
Eclipse new Java class dialog with class name set to 'SampleTest' and main method checkbox selected
  • Click on Finish button. It will add a new class file under the package folder as shown in the image below.
Eclipse Project Explorer showing 'SampleTest.java' class file added under 'testPackage'

Add Selenium WebDriver JAR Files to the Project

Now you need to add the Selenium WebDriver jar files to the Selenium project.

  • Right-click on the project file.
  • Select properties.
Accessing project properties in Eclipse by right-clicking the Java project and selecting 'Properties'
  • It will open the project properties dialog.
Eclipse IDE showing Project Properties dialog for Java project configuration
  • Go to the Java Build Path option and select the Libraries tab.
  • Click on the Add External JARs button.
  • It will open a file selection dialog to select jar files.
  • Go to the selenium jar folder(unzipped) and select all jar files and click the Open button.
Selecting all Selenium WebDriver JAR files from the unzipped folder to add in Eclipse
  • Again, click on the Add External JARs button.
  • Go to the lib folder → select all jar files and click the Open button.
lib folder of Selenium Java client showing selected JAR files for Eclipse project configuration
  • All the selenium jars will be added to the project’s build path.
Eclipse Project Properties showing all Selenium JAR files added to Java Build Path

You’ve successfully learned how to download Selenium WebDriver JAR files and configure them in Eclipse. Now, you’re ready to write your first Selenium test.

Final Thoughts

Downloading Selenium WebDriver JAR files and setting them up in Eclipse is the first step toward building powerful automation test scripts in Java. With just a few simple configurations, you’re now ready to start writing and running your first Selenium tests. Whether you’re a beginner or brushing up your skills, this setup lays the foundation for efficient browser automation.

Leave a Reply

Your email address will not be published. Required fields are marked *