install selenium

How to Download and Install Selenium?

March 30th, 2026
6869
10:00 Minutes

The software development industry is rapidly evolving, with automation testing tools driving efficiency and innovation. Selenium, an open-source automation testing tool, is a top choice for companies like Netflix, Google, Amazon, IBM, Salesforce, and Accenture due to its robust browser automation capabilities. According to the Bureau of Labor Statistics, computer and IT jobs are projected to grow significantly from 2023 to 2033, with approximately 356,700 annual job openings, offering salaries in India ranging from INR 4 lakhs to INR 14 lakhs per annum.

This guide provides a clear, step-by-step process to install Selenium WebDriver and its prerequisites, empowering you to start automation testing.

Master Automation Testing with Selenium Training

Learn to build robust test scripts and ensure software quality.

Explore Now

Prerequisites for Selenium WebDriver

To use Selenium WebDriver effectively, install the following:

  • Java Development Kit (JDK): Required to write and run Selenium scripts in Java.
  • Eclipse IDE: A recommended environment for Java-based Selenium projects.
  • Browser-Specific WebDriver: Drivers like ChromeDriver or GeckoDriver to interact with browsers.

How to Install the Java Development Kit (JDK)?

Installing the JDK is essential for running Selenium scripts.

Step 1: Download the JDK

Visit the Oracle website or adoptium.net to download the latest JDK (e.g., JDK 21). Choose the version compatible with your operating system (Windows, macOS, or Linux).

JDK Development Kit Install Selenium

Step 2: Run the JDK Installer

Locate the downloaded installer, double-click to launch it, and follow the setup wizard. Select the installation path and include the public Java Runtime Environment (JRE) if prompted.

Step 3: Configure Java Environment Variables

Set the JAVA_HOME environment variable to the JDK installation directory (e.g., C:\Program Files\Java\jdk-21). Add %JAVA_HOME%\bin to the system's PATH variable.

Step 4: Verify the Installation

Open a terminal or command prompt and run:

java -version

javac -version

These commands should display the installed JDK version.

Related Article: Selenium Tutorial For Beginners

How to Install Eclipse IDE?

Eclipse is a popular IDE for developing Selenium scripts.

Step 1: Download Eclipse

Visit the official Eclipse website and download the latest Eclipse IDE for Java Developers, ensuring compatibility with your system.

Step 2: Run the Eclipse Installer

Locate the installer, double-click to start the setup, and follow the prompts to select the installation folder and Eclipse version.

Step 3: Configure the Eclipse Workspace

Launch Eclipse and select a workspace directory to store your projects. Confirm the settings to complete the setup.

Step 4: Verify the Installation

Open Eclipse and create a new Java project to ensure the IDE is functioning correctly.

How to Install Selenium WebDriver?

With JDK and Eclipse installed, you're ready to set up Selenium WebDriver.

Step 1: Download Selenium WebDriver

Visit the official Selenium website and download the Selenium WebDriver Java bindings (provided as a ZIP file).

Step 2: Add Selenium to Your Project

In Eclipse, create a new Java project, then:

  • Extract the Selenium ZIP file.
  • Add the Selenium .jar files to your project's build path (Right-click project > Build Path > Configure Build Path > Libraries > Add External JARs).

Step 3: Download Browser-Specific WebDriver

Download the WebDriver for your browser:

Ensure the version matches your browser. Extract the executable and save it in a known directory.

Step 4: Configure WebDriver Path

Add the WebDriver executable's directory to your system's PATH variable or specify the path in your script using:

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");

Step 5: Verify the Installation

Create a simple Selenium test script in Eclipse:

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

public class SeleniumTest {

public static void main(String[] args) {

WebDriver driver = new ChromeDriver();

driver.get("https://www.example.com");

driver.quit();

}

}

Run the script. If the browser opens and navigates to the URL, your setup is correct.

Wrapping Up

This guide outlines the steps to install Selenium WebDriver and its prerequisites. By setting up JDK, Eclipse, and browser-specific WebDrivers, you're ready to begin automation testing. Verify each step to ensure a smooth setup, and explore Selenium's documentation for advanced features.

FAQs

Q1: Is Selenium free to use?

Yes, Selenium is an open-source tool, freely available for download and use, making it a versatile choice for automation testing.

Q2: Do I need coding knowledge for Selenium?

While coding knowledge (e.g., Java, Python) enhances Selenium usage, beginners can learn it with basic programming skills through online tutorials.

Q3: Can I use Visual Studio Code (VS Code) for Selenium?

Yes, VS Code supports Selenium with Java or Python, though Eclipse or IntelliJ IDEA are preferred by traditional automation engineers for their robust Java support.

About the Author
Priyanka Sharma
About the Author

Priyanka is a versatile technical content writer with expertise in Blockchain, Cloud Computing, Software Testing, UI/UX, and Corporate Training. With a strong ability to cover diverse tech domains, she focuses on creating clear, practical, and easy-to-understand content for a wide audience.

Drop Us a Query
Fields marked * are mandatory
×

Your Shopping Cart


Your shopping cart is empty.