Configure Selenium Java and JUnit Framework for Web Automation

Configure the JAR files for the Selenium Web Automation project. We will make use of Eclipse IDE to configure our project before the web automation.

Prerequisites

  1. Eclipse IDE

Create a Java Project

Launch Eclipse IDE in your preferred workspace. I will be working on Eclipse IDE 2021‑09. You might have a different version but the process will be the same.

Launch Eclipse IDE in your preferred workspace for Selenium Java Web Automation

Click on File -> New -> Java Project.

Create a new Java Project for Selenium Java Web Automation

Give the project name and select the execution environment. I will be working on Java 8, therefore, I have selected JavaSE-1.8. Keep all the settings to default and click on Finish.

Give project name and select the execution environment for Selenium Java Web Automation

Open the Project Explorer to find your new Java Project created.

Java project created for selenium java web automation

Configure Build Path

We have to add all the selenium libraries that will help build and run our web automation. Right-click on the project name, click on Build Path -> Configure Build Path.

Configure build path to add external selenium jar files

Go to Libraries and click on Add External JARs.

Configure Build path to add external JAR file of Selenium Java

Navigate to the folder and select all the JAR files and click on Open. You can download the JAR files from the Download page -> Cucumber Selenium JAR Files. Remove all the JARs with the name cucumber because we are not using them in our demo. These JAR files are compatible with Java 8. If you are using Java > 8, then you will have to download the upgraded version of the below jars from Maven Repository.

Add Selenium JAR files to build path

After you have added all the external JARs, click on Apply and Close.

Apply the Selenium Java External JARs.

You can see all the External JARs under Referenced Libraries in your project.

Added the External JARs.

Thank you All!!! Hope you find this useful.


One thought on “Configure Selenium Java and JUnit Framework for Web Automation

Add yours

Leave a Reply

Up ↑

%d bloggers like this: