Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

To install Selenium WebDriver, install a JDK and set JAVA_HOME if you are working in Java, add the Selenium library through your language's package manager (Maven or Gradle for Java, pip for Python, npm for JavaScript), and let Selenium Manager handle the browser driver. From Selenium 4.6 onward, the matching ChromeDriver, GeckoDriver, or EdgeDriver is downloaded automatically, so a manual driver download is usually unnecessary. Write a short first test, run it, and the browser launches.
Here is the install at a glance, with the rest of this guide expanding each step:
For a deeper community discussion, explore this thread on how to download and install Selenium WebDriver.
If you plan to write tests in Java, the Java Development Kit (JDK) is the only prerequisite that needs explicit setup. Selenium 4 requires JDK 11 or higher; for a new project, install a Long Term Support release such as JDK 17 or JDK 21 from Adoptium (Temurin) or Oracle.
java -version
javac -version
echo $JAVA_HOMEPrerequisites differ per language. Python only needs a Python 3 runtime and Node.js only needs Node installed; neither requires a JDK. Those quick installs are covered further down.
The cleanest way to add Selenium to a Java project is through a build tool. A dependency manager beats manually downloading JARs because it resolves every transitive dependency for you, keeps versions consistent across the team, and lets you upgrade Selenium by changing a single line. Use one of the snippets below depending on your build tool.
Maven: add the selenium-java dependency inside the <dependencies> block of your pom.xml.
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.21.0</version>
</dependency>Gradle: add Selenium as a testImplementation dependency in your build.gradle.
dependencies {
testImplementation 'org.seleniumhq.selenium:selenium-java:4.21.0'
}Manual alternative: you can still download the Java client JARs from selenium.dev and add them to your project's build path. If you prefer that click-by-click route in Eclipse, follow the dedicated walkthrough on How Do I Install Selenium and Set Up the Environment for Testing?, then come back here for driver and first-test details.
You can run Selenium from any editor, but an IDE such as IntelliJ IDEA or Eclipse gives you autocompletion, inline error checking, and an integrated test runner. The smoothest path is to create a Maven or Gradle project so the IDE pulls Selenium in automatically.
The screenshot-heavy "create a project and add external JARs" walkthrough lives in the sibling guide linked above, so this page keeps the IDE step brief and focuses on the modern, dependency-managed flow.
Historically, Selenium needed a separate browser driver binary (ChromeDriver, GeckoDriver, or EdgeDriver) downloaded by hand and placed on the system PATH. That step is now automated.
The practical takeaway: for most installations you can skip the ChromeDriver download entirely and let Selenium Manager do the work. The first-test snippets below rely on exactly this behavior.
With the dependency in place, a minimal Java test confirms everything works. Notice there is no System.setProperty call for the driver path; Selenium Manager resolves ChromeDriver on the first run.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class FirstSeleniumTest {
public static void main(String[] args) {
// Selenium Manager (4.6+) auto-resolves ChromeDriver - no setProperty needed
WebDriver driver = new ChromeDriver();
driver.get("https://www.lambdatest.com/");
System.out.println("Page title is: " + driver.getTitle());
driver.quit();
}
}Run it from the IDE with the green run arrow, or from the terminal with mvn test if you wired it into a test framework. A Chrome window opens, the page title prints to the console, and the browser closes. Once this passes, you are ready to move on to How Do I Write and Run Test Scripts in Selenium?.
Selenium is not a Java-only tool. The same WebDriver standard backs official bindings for Python, JavaScript, C#, and Ruby, and Selenium Manager works across all of them.
Python: with Python 3 installed, a single command adds the binding.
pip install seleniumA six-line script then launches a browser with no driver setup:
from selenium import webdriver
driver = webdriver.Chrome() # Selenium Manager fetches the driver automatically
driver.get("https://www.lambdatest.com/")
print("Page title is:", driver.title)
driver.quit()JavaScript / Node.js: with Node installed, add the package to your project.
npm install selenium-webdriverBecause Selenium Manager is binding-agnostic, the Python and Node installs behave the same way as Java: the matching driver is fetched on the first run, so there is nothing extra to configure.
The definitive verification is simple: if your first test launches the browser and prints the page title, Selenium is installed correctly. You can double-check the resolved version with mvn dependency:tree for Java or pip show selenium for Python. If something fails, the issues below cover most cases.
A local install is perfect for learning and for running a handful of tests, but maintaining a JDK, the right browser versions, and drivers on every machine and CI agent quickly becomes tedious. You can skip that maintenance by pointing a RemoteWebDriver at a cloud Selenium grid such as TestMu AI (Formerly LambdaTest), which offers 3,000+ browser and OS combinations on demand. The install on your side stays minimal, the browsers and drivers live in the cloud, and your tests run in parallel against the exact environments you need.
Usually not. Selenium Manager is built into Selenium 4.6 and later and runs by default. It detects your installed browser, downloads the matching driver, and caches it automatically, so a manual ChromeDriver or GeckoDriver download is no longer required for most setups. You only need to set a driver by hand in offline or air-gapped environments, or when you must pin a specific driver version.
Install Python 3, then run pip install selenium. That single command pulls the Selenium binding and its dependencies. From version 4.6 onward, Selenium Manager resolves the browser driver for you, so a six-line script using webdriver.Chrome() will launch a browser with no extra driver setup.
Selenium is the umbrella project that includes WebDriver, Selenium Grid, and the Selenium IDE recorder. Selenium WebDriver is the specific component (and now a W3C standard) that drives a real browser programmatically through language bindings such as Java, Python, JavaScript, and C#. When people say they are installing Selenium for automation, they almost always mean installing the WebDriver binding.
Selenium 4 requires JDK 11 or higher. For new projects, install a current Long Term Support release such as JDK 17 or JDK 21 from Adoptium (Temurin) or Oracle, set JAVA_HOME, and confirm with java -version. LTS builds get the longest support window and avoid the churn of non-LTS releases.
Use a build tool such as Maven or Gradle. Declaring the selenium-java dependency lets the build tool resolve every transitive dependency, keep versions consistent, and upgrade with a single line. Manually downloading client JARs and adding them to the build path still works, but it is error-prone and harder to maintain across a team.
Run a minimal test that opens a browser, loads a page, prints the title, and quits. If the browser launches and the title prints, the binding and driver are working. You can also inspect the dependency with mvn dependency:tree for Java or pip show selenium for Python to confirm the installed version.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance