If you’re looking to begin test automation using Selenium, the first thing you need to do is set up your development environment correctly. This guide will help you through the complete process of installing Selenium, starting from installing Java all the way to running your very first test script, with simple steps that anyone can follow.
Whether you’re a beginner or have some experience, In this comprehensive guide, we will take a closer look at how to set up Selenium specifically for Java using the Eclipse IDE, ensuring a smooth and efficient development experience.
Table of Contents
What Is Selenium?
Selenium is an incredibly powerful, open-source tool designed for automating web browsers. It offers support for a variety of programming languages, including Java, Python, C#, and JavaScript, making it an ideal choice for developers.
Prerequisites for Selenium
- Basic knowledge of Java programming
- A Windows-based system
- Internet connection for downloading the necessary tools
Selenium Environment Setup
Installing Selenium requires going through the following steps:
Step 1: Install Java
Before moving further download and install Java Software Development Kit (JDK) in the first place. The location from where you can download Java is:
Download Java JDK
Step 2: Install Eclipse IDE
Next, download and install Eclipse IDE for Java developers keeping in mind the 32 or 64-bit windows versions.
The location to download this exe file is:
https://www.eclipse.org/downloads/
The downloaded file will be with the name “eclipse-inst-win64”. Now double click on the file to install it on your system. A new window will appear with several options like this :

Click the first option named Eclipse IDE for Java Developers. A new window will appear where you need to change the storage path to:
“c:eclipse” and Install.
Get 100% Hike!
Master Most in Demand Skills Now!
Step 3: Download Selenium Java Client Driver
Now download Selenium Java Client Driver. The location to download this tool is
Selenium Java Client Driver
Here you will find the drivers for all the languages but install them for Java only. The drivers come in zipped files containing all the JAR files. There will be two JAR files, a lib folder, and one changelog file. Create a new folder and rename it as ‘Selenium’ in C drive and extract the zip file to this file.
Step 4: Configure Eclipse IDE
After completing the previous step a dialog box will open asking to choose a workspace. select the default location.
Or create a workspace in C drive and confirm it by pressing OK.
Step 5: Create a new Java Project
Click on the File menu, then go to New and select Java Project. Save the project as ‘new project’.

Step 6: Create a new Java Class
In order to create a new Java Class, click on File Menu and go to New and save it as ‘Myclass’.

Now right click on the newproject and go to select properties. There click on “Java Build Path”. Click on the ‘Libraries’ tab and then ‘Add External JARs’. ow select the JAR files you need from the new pop-up window and select ‘OK’. Add all the JAR files that are inside and outside the “libs” folder. Now click Ok to finish importing the library files. We can also integrate Selenium IDE with different web search engines to automate our testing process.
Step 7: Sample Selenium Test Script
To confirm your setup is working, run the following test:

package myPack;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class MyClass {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com");
}
}
It will open your web browser (Google Chrome) and automatically open the Google search page.
Conclusion
Selenium with Eclipse has now been successfully installed and set up on your Windows computer. You’re prepared to start writing test automation scripts!
Think about making the login form or search feature work automatically. You might also look into tools like TestNG and JUnit to help organise your test cases better.
FAQs – Frequently Ask Questions
1. Is Selenium free?
Yes, Selenium is fully open-source and free to use, allowing everyone to access its amazing features without any costs.
2. What languages does Selenium support?
Java, Python, C#, Ruby, JavaScript (Node.js), and Kotlin. These languages are fantastic options for developers looking to enhance their skills and create amazing applications.
3. What is the difference between Selenium WebDriver and Selenium IDE?
WebDriver is a fantastic tool for reliable automation. It makes tasks smoother and more efficient. The IDE, which is a handy browser extension, is perfect for recording and playback, making everything so much easier for you.