Selenium Setup Guide
Get Selenium WebDriver running locally so you can automate the pages on this site. Pick your language, then pick your OS.
- ✅ A code editor (VS Code, IntelliJ, or your preferred IDE)
- ✅ Google Chrome or Firefox installed
- ✅ Language runtime for the tab you choose below
Installation
-
Install the JDK
Go to oracle.com/java/technologies/downloads and download the JDK 17 or higher (LTS) — Windows x64 Installer (the
.msi). Run it — it adds Java to PATH automatically. If a tool later asks forJAVA_HOME, set it manually via System Properties → Environment Variables to your JDK folder (e.g.C:\Program Files\Java\jdk-17).Open Command Prompt and confirm it installed:
java -versionYou should see something like
java version "17.0.x". -
Install an IDE — Eclipse or IntelliJ
Either works fine for the rest of this guide. Pick one:
Eclipse: download the installer from eclipse.org/downloads, run it, and choose "Eclipse IDE for Enterprise Java and Web Developers".
IntelliJ IDEA: download the free Community edition from jetbrains.com/idea/download and run the installer.
-
Install Maven
Download from maven.apache.org, unzip it, and add its
binfolder to PATH in system environment variables.mvn -version -
Install ChromeDriver
Check your installed Chrome version: open Chrome and go to
chrome://settings/help.Then download the matching driver from googlechromelabs.github.io/chrome-for-testing — pick the chromedriver row under win64, and unzip it somewhere permanent, e.g.
C:\chromedriver\chromedriver.exe.You can usually skip this Selenium 4.6+ ships with Selenium Manager, which auto-downloads the matching driver the first time you runnew ChromeDriver()— no manual install needed. Do this manually only if you need to pin an exact driver version. -
Create a project and add Selenium
In your IDE: File → New → Project → Maven, or from a terminal:
mvn archetype:generate -DgroupId=com.practice -DartifactId=selenium-practice -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false cd selenium-practiceAdd to
pom.xmlinside<dependencies>:<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.24.0</version> </dependency> -
Verify with a basic test
Open the project in your IDE and replace
App.javawith:import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class App { public static void main(String[] args) throws InterruptedException { // Only needed if you installed ChromeDriver manually in the step above: // System.setProperty("webdriver.chrome.driver", "C:\\chromedriver\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://example.com"); Thread.sleep(3000); driver.quit(); } }Run it from your IDE (right-click the file → Run), or from a terminal:
mvn compile exec:java -Dexec.mainClass="com.practice.App"A Chrome window should open, load example.com, then close after 3 seconds — that's a working setup.
-
Install the JDK
Go to oracle.com/java/technologies/downloads and download the JDK 17 (LTS) macOS Installer — pick ARM64 for Apple Silicon or x64 for Intel. Run the
.dmg, then confirm:java -versionPrefer Homebrew?
brew install openjdk@17works too. -
Install an IDE — Eclipse or IntelliJ
Either works fine for the rest of this guide. Pick one:
Eclipse: download the installer (.dmg) from eclipse.org/downloads, open it, and choose "Eclipse IDE for Enterprise Java and Web Developers".
IntelliJ IDEA: download the free Community edition from jetbrains.com/idea/download (pick the Apple Silicon build if you're on an M-series Mac).
-
Install Maven
brew install mavenmvn -version -
Install ChromeDriver
Check your installed Chrome version: Chrome menu → Chrome → About Google Chrome.
Then download the matching driver from googlechromelabs.github.io/chrome-for-testing — pick mac-arm64 (Apple Silicon) or mac-x64 (Intel), and unzip it somewhere permanent, e.g.
~/chromedriver/chromedriver.macOS blocks the binary the first time — clear the quarantine flag once:
xattr -d com.apple.quarantine ~/chromedriver/chromedriverYou can usually skip this Selenium 4.6+ ships with Selenium Manager, which auto-downloads the matching driver the first time you runnew ChromeDriver()— no manual install needed. Do this manually only if you need to pin an exact driver version. -
Create a project and add Selenium
In your IDE: File → New → Project → Maven, or from a terminal:
mvn archetype:generate -DgroupId=com.practice -DartifactId=selenium-practice -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false cd selenium-practiceAdd to
pom.xmlinside<dependencies>:<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.24.0</version> </dependency> -
Verify with a basic test
Open the project in your IDE and replace
App.javawith:import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class App { public static void main(String[] args) throws InterruptedException { // Only needed if you installed ChromeDriver manually in the step above: // System.setProperty("webdriver.chrome.driver", "/Users/you/chromedriver/chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("https://example.com"); Thread.sleep(3000); driver.quit(); } }Run it from your IDE (right-click the file → Run), or from a terminal:
mvn compile exec:java -Dexec.mainClass="com.practice.App"A Chrome window should open, load example.com, then close after 3 seconds — that's a working setup.
-
Install Python
Go to python.org/downloads and download the latest Python 3 Windows installer. Run it, and on the first screen make sure "Add python.exe to PATH" is checked before clicking Install.
Open Command Prompt and confirm it installed:
python --version -
Install an IDE — PyCharm or VS Code
Either works fine for the rest of this guide. Pick one:
PyCharm: download the free Community edition from jetbrains.com/pycharm/download and run the installer.
VS Code: download from code.visualstudio.com, install it, then install the Python extension from the Extensions panel.
-
Install ChromeDriver
Check your installed Chrome version: open Chrome and go to
chrome://settings/help.Then download the matching driver from googlechromelabs.github.io/chrome-for-testing — pick the chromedriver row under win64, and unzip it somewhere permanent, e.g.
C:\chromedriver\chromedriver.exe.You can usually skip this Selenium 4.6+ ships with Selenium Manager, which auto-downloads the matching driver the first time you runwebdriver.Chrome()— no manual install needed. Do this manually only if you need to pin an exact driver version. -
Create a project and install Selenium
In your IDE, open a new folder as your project, or from a terminal:
mkdir selenium-practice cd selenium-practice python -m venv venv venv\Scripts\activatepip install selenium -
Verify with a basic test
Save as
verify.py:from selenium import webdriver import time # Only needed if you installed ChromeDriver manually in the step above: # from selenium.webdriver.chrome.service import Service # driver = webdriver.Chrome(service=Service("C:\\chromedriver\\chromedriver.exe")) driver = webdriver.Chrome() driver.get("https://example.com") time.sleep(3) driver.quit()Run it from your IDE, or from a terminal:
python verify.pyA Chrome window should open, load example.com, then close after 3 seconds — that's a working setup.
-
Install Python
Using Homebrew (or download the macOS installer from python.org/downloads instead):
brew install pythonpython3 --version -
Install an IDE — PyCharm or VS Code
Either works fine for the rest of this guide. Pick one:
PyCharm: download the free Community edition from jetbrains.com/pycharm/download (pick the Apple Silicon build if you're on an M-series Mac).
VS Code: download from code.visualstudio.com, install it, then install the Python extension from the Extensions panel.
-
Install ChromeDriver
Check your installed Chrome version: Chrome menu → Chrome → About Google Chrome.
Then download the matching driver from googlechromelabs.github.io/chrome-for-testing — pick mac-arm64 (Apple Silicon) or mac-x64 (Intel), and unzip it somewhere permanent, e.g.
~/chromedriver/chromedriver.macOS blocks the binary the first time — clear the quarantine flag once:
xattr -d com.apple.quarantine ~/chromedriver/chromedriverYou can usually skip this Selenium 4.6+ ships with Selenium Manager, which auto-downloads the matching driver the first time you runwebdriver.Chrome()— no manual install needed. Do this manually only if you need to pin an exact driver version. -
Create a project and install Selenium
mkdir selenium-practice cd selenium-practice python3 -m venv venv source venv/bin/activatepip install selenium -
Verify with a basic test
Save as
verify.py:from selenium import webdriver import time # Only needed if you installed ChromeDriver manually in the step above: # from selenium.webdriver.chrome.service import Service # driver = webdriver.Chrome(service=Service("/Users/you/chromedriver/chromedriver")) driver = webdriver.Chrome() driver.get("https://example.com") time.sleep(3) driver.quit()Run it from your IDE, or from a terminal:
python3 verify.pyA Chrome window should open, load example.com, then close after 3 seconds — that's a working setup.
-
Install the .NET SDK
Download from dotnet.microsoft.com and run the installer.
dotnet --version -
Create a console project
dotnet new console -n SeleniumPractice cd SeleniumPractice -
Add Selenium
dotnet add package Selenium.WebDriver -
Verify the install
Replace
Program.cswith:using OpenQA.Selenium; using OpenQA.Selenium.Chrome; var driver = new ChromeDriver(); driver.Navigate().GoToUrl("https://example.com"); Thread.Sleep(3000); driver.Quit();dotnet run
-
Install the .NET SDK
brew install --cask dotnet-sdkdotnet --version -
Create a console project
dotnet new console -n SeleniumPractice cd SeleniumPractice -
Add Selenium
dotnet add package Selenium.WebDriver -
Verify the install
Replace
Program.cswith:using OpenQA.Selenium; using OpenQA.Selenium.Chrome; var driver = new ChromeDriver(); driver.Navigate().GoToUrl("https://example.com"); Thread.Sleep(3000); driver.Quit();dotnet run
-
Install Node.js
Go to nodejs.org and download the Node.js 24 (LTS) installer — it's the version highlighted by default on the download page.
node --version -
Create a project
mkdir selenium-practice cd selenium-practice npm init -y npm install selenium-webdriver -
Verify the install
Save as
verify.js:const { Builder } = require('selenium-webdriver'); (async function verify() { const driver = await new Builder().forBrowser('chrome').build(); await driver.get('https://example.com'); await driver.sleep(3000); await driver.quit(); })();node verify.js
-
Install Node.js
Using Homebrew (or download the Node.js 24 (LTS) installer from nodejs.org instead):
brew install node@24 -
Create a project
mkdir selenium-practice cd selenium-practice npm init -y npm install selenium-webdriver -
Verify the install
Save as
verify.js:const { Builder } = require('selenium-webdriver'); (async function verify() { const driver = await new Builder().forBrowser('chrome').build(); await driver.get('https://example.com'); await driver.sleep(3000); await driver.quit(); })();node verify.js