Selenium Grid runs WebDriver tests against remote browsers; it does not replace Selenium’s test code or browser automation API. For a first working setup, start Grid in Standalone mode and point a RemoteWebDriver at http://localhost:4444. Expand to multiple nodes when you need more parallel capacity or machines and operating systems that your local Grid cannot provide.
What Selenium Grid does—and when to use it
WebDriver is Selenium’s browser automation API and protocol, described by Selenium as a W3C Recommendation. A browser-specific implementation communicates with the browser; Grid adds a routing layer so a WebDriver script can create a session on a remote browser instance. That makes it useful for running tests in parallel and across browser or platform combinations. Selenium WebDriver documentation · Selenium Grid documentation
Use Grid when you need to test browsers or versions on different operating systems, run several browser sessions at once, or place browser execution on machines separate from the test runner. For a single developer or a straightforward CI job, Standalone is usually the simplest starting point: it puts the Grid components in one process on one machine. Selenium positions it for local development and debugging, quick pre-push suites, and simple CI setups. Selenium Grid: Getting started
Grid can shorten suite turnaround by distributing independent tests, but adding nodes does not guarantee a proportional speedup. The workload examples in Selenium’s documentation are arithmetic illustrations, not benchmarks for your tests or hardware. Measure with your own suite before sizing a larger deployment. When to Use Grid
#1 Best Overall
Start a local Standalone Grid
Prerequisites
- Java 11 or higher.
- Installed browsers and browser drivers. Selenium Manager can configure drivers when enabled with
--selenium-manager true. - The Selenium Server JAR. Use the version you have downloaded; this guide intentionally does not pin a version because the documentation’s latest release can change. See Selenium’s official Grid getting-started page for current download instructions.
1. Start the server
From the directory containing the JAR, replace <version> with the version in its filename:
java -jar selenium-server-<version>.jar standalone
To have Grid use Selenium Manager for driver configuration, add the documented option:
java -jar selenium-server-<version>.jar standalone --selenium-manager true
Keep this process running. The default remote WebDriver endpoint is http://localhost:4444; the Grid UI is available at the same address in a browser. Selenium Grid: Getting started
2. Point a test at the remote endpoint
Here is a minimal Java example using Selenium’s Java binding. It creates a remote Chrome session, opens a page, prints the title, and closes the session. Add the Selenium Java dependency appropriate to your project before compiling.
Rank #2
import java.net.URL;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.RemoteWebDriver;
public class RemoteSmokeTest {
public static void main(String[] args) throws Exception {
ChromeOptions options = new ChromeOptions();
WebDriver driver = new RemoteWebDriver(
new URL("http://localhost:4444"), options);
try {
driver.get("https://example.com");
System.out.println(driver.getTitle());
} finally {
driver.quit();
}
}
}
The URL passed to RemoteWebDriver is the Grid endpoint, not the page being tested. The requested browser is represented by the browser options; Grid matches the request to an available browser slot. For a remote Grid on another host, substitute its reachable address, subject to the network and security controls described below.
3. Confirm that the session works
- Start the Standalone process and wait for it to finish initializing.
- Open
http://localhost:4444to view the Grid UI. - Run the test. A successful session should navigate to the test URL and print its title.
- Ensure cleanup calls
quit(), including when assertions or navigation fail, so the browser session is released.
Choose a Grid topology
Standalone: one machine, one process
Standalone combines Grid components in one process and manages browser sessions on the same machine. It minimizes setup and is a reasonable choice for local debugging, small pre-push suites, or uncomplicated CI. Its capacity is bounded by the machine’s resources and installed browser coverage.
Hub-and-Node: coordinate capacity across machines
Use a distributed Grid when one entry point should coordinate browser sessions on multiple machines or you need to scale capacity separately from the test runner. Grid 4 includes a Router, Distributor, Session Map, New Session Queue, Event Bus, and Nodes. The Router accepts WebDriver requests; new sessions are queued and assigned to available browser slots on Nodes. You generally do not need to configure each component separately to get started, but the topology and CLI configuration matter as the deployment grows. Grid CLI options
Containers and Kubernetes
For containerized operation, Selenium documents Docker Selenium images and a Kubernetes Helm deployment route. These approaches can make it easier to reproduce node environments and manage multiple instances, but they also add deployment, networking, and resource-management responsibilities. Follow the project’s deployment documentation for the mode you choose: Docker Selenium Grid Repository and Grid configuration and CLI options.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Managed cloud browser service
A managed service may suit a team that needs remote browser coverage but does not want to operate Grid infrastructure. Provider support, browser and OS versions, geography, network access controls, concurrency limits, and current pricing vary; verify each directly with a provider before selecting one. Selenium’s older Grid 3 documentation names services and infrastructure providers as historical examples, not confirmation of what they currently offer. Legacy Selenium Grid 3 setup page
Plan browser coverage, concurrency, and resources
Start from the tests you actually need to run, then map the browser, version, and operating-system combinations they require. Estimate concurrency from the number of independent sessions you want at once, not simply from the total test count. Tests that share state or depend on one another may not be safe to parallelize.
| Planning factor | What to decide |
|---|---|
| Browser and OS matrix | Which browser families, versions, and operating systems are required? Include only combinations you need to validate. |
| Parallel sessions | How many simultaneous browser sessions meaningfully reduce your measured suite turnaround? |
| Node capacity | How many browser slots can each machine sustain without contention or instability? |
| Operations ownership | Can your team maintain Grid, browser images, machines, updates, and network access, or would managed infrastructure fit better? |
| Security boundary | Which test runners may reach the WebDriver endpoint, and what firewall rules prevent other access? |
Selenium says a node’s default browser-session capacity is generally limited by available CPUs, with Safari limited to one session. It gives around 1 GB of RAM per browser session as an expectation. These are reference values, not guaranteed requirements for your environment; measure representative tests on the machines and browser versions you intend to use. Selenium Grid: Getting started
Selenium’s “When to Use Grid” page gives illustrative calculations: 15 tests at 45 seconds each are shown as 11 minutes 15 seconds without Grid, 2 minutes 15 seconds with five nodes, and 45 seconds with 15 nodes. Another illustration shows 100 tests at 120 seconds each taking 13 minutes 20 seconds with 15 nodes versus over three hours without Grid. These figures are examples from Selenium Project documentation, with no publication year stated on the page; they are not measured or guaranteed results for a particular setup. When to Use Grid
Rank #4
Protect the Grid endpoint
A Grid endpoint is powerful: clients that can reach it can request browser sessions and execute automation. Selenium’s getting-started documentation warns that an externally exposed Grid could let third parties access the Grid infrastructure, internal applications and files, or run custom binaries. Restrict network access with appropriate firewall permissions; do not treat a default endpoint as safe to expose publicly. Selenium Grid: Getting started
- Keep a local Standalone endpoint bound to a trusted environment when practical.
- For remote nodes, permit access only from the test runners and administrators that need it.
- Review the network boundaries around any internal applications the browser can reach.
- Before exposing Grid beyond a trusted network, review Selenium’s configuration and security guidance for your deployment.
Troubleshoot common quickstart failures
Java version or JAR launch error
Check that the installed Java runtime is version 11 or higher and that the command names the actual Selenium Server JAR. Run the command from its directory or provide the correct file path.
Connection refused at localhost:4444
Grid may not have started, may have exited with an error, or may be listening on a different host or port. Check the server console output and open the Grid UI at http://localhost:4444. If the test runs in a container or on a different machine, its localhost refers to that environment, not necessarily the machine hosting Grid; use an address reachable from the test runner.
Browser or driver cannot be created
Verify that the requested browser is installed on the machine running the browser session and that the driver is available. If you expect Selenium Manager to configure drivers, start Grid with --selenium-manager true as documented, and inspect the server output for setup errors.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
Session request waits or fails despite a live endpoint
The endpoint can be reachable while no matching browser slot is available. Confirm that the requested browser matches an installed browser and that existing sessions have released their slots with quit(). For a distributed deployment, check that the Node is connected and advertises the required browser capability.
Tests are slower or less stable after adding parallelism
More sessions consume CPU, memory, and browser resources. Reduce concurrency, inspect resource pressure, and compare suite times under controlled runs. Also check whether tests share accounts, data, or other mutable state; Grid does not make a non-independent test safe to parallelize.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers—not a Selenium Grid replacement for interactive WebDriver testing. If the task is to capture a page as an image or PDF rather than operate a browser through a test suite, one GET request can return PNG, JPEG, WebP, or PDF. See the ScreenshotNeo website and API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Cookie banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents such as Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Can I use Selenium Grid for screenshots instead of a screenshot API?
Yes, if you need to automate a browser as part of a WebDriver workflow; for a one-request page capture, ScreenshotNeo is a more direct fit.
Does adding Grid nodes make every test suite faster?
No. The benefit depends on independent tests, available resources, and the workload; measure your own suite.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




