Selenium 4 RC 1: What’s New and How to Try It
Selenium 4 RC1 was a 2021 release candidate with relative locators, network interception, and authentication support. Here’s what changed and how to approach it today.
Selenium 4 RC1 was the first release candidate for Selenium 4, announced on September 6, 2021. It highlighted relative locators, network interception, and basic or digest authentication. RC1 was an early try-and-report build, not a final release. It was followed by RC2 on October 2 and Selenium 4.0.0 on October 13, 2021. If you are choosing Selenium today, use the current official Selenium release and documentation; the sources here do not establish that the 2021 RC1 artifacts work with current browsers and drivers.
What was new in Selenium 4 RC1?
The RC1 announcement called out three areas:
- Relative locators: Find an element by its position relative to another element, such as above or to the right of a known element. This can express a relationship that is useful when a page does not provide a convenient unique selector.
- Network interception: Intercept browser network traffic. The later RC2 announcement describes capturing and modifying HTTP traffic and accessing response status codes; treat those details as context for the release-candidate series, not as a guarantee that every RC2 capability was present in RC1.
- Basic and digest authentication: The RC1 announcement lists support for these authentication schemes.
The Selenium 4 stable launch later described additional changes, including a rebuilt Grid, GraphQL, live VNC previews, and OpenTelemetry support. Those are Selenium 4 launch-context features; they should not all be described as new in RC1.
How to try RC1 at the time
In September 2021, the Selenium project said the candidate could be obtained through the package manager for the language binding or downloaded from the Selenium site. It named Maven, NuGet, npm, pip, and RubyGems. The announcement does not provide binding-specific install commands, so there is no single verified RC1 command to reproduce here. Use the historical release announcement and package metadata to identify the exact candidate artifact for your binding.
- Choose the language binding you use: .NET, Java, Python, Ruby, or JavaScript.
- Consult the RC1 announcement and the corresponding package repository for the candidate version and install syntax. Do not substitute a current package version if your goal is to reproduce the 2021 candidate.
- Update browser drivers before changing the Selenium dependency. The announcement specifically advised Firefox users to update geckodriver to 0.29.1 or later.
- Run a small test against a disposable browser profile and record the browser, driver, operating system, binding, and Selenium versions with any issue report.
These are historical instructions. The reviewed sources do not verify that the RC1 packages remain available or that they are compatible with present-day browsers and drivers. For current Selenium setup, start at the official Selenium documentation.
What changed after RC1?
| Release | Date | Context |
|---|---|---|
| Selenium 4 RC1 | September 6, 2021 | First release candidate; the project invited users to try it and report issues. |
| Selenium 4 RC2 | October 2, 2021 | Second and likely final candidate, with fixes based on feedback. The post noted a fix for CDP-related features breaking when the first window was closed. |
| Selenium 4.0.0 | October 13, 2021 | Stable release. The project said the 3.x upgrade aimed to preserve public APIs, while warning that internal or deprecated API users could encounter issues. |
That timeline matters when reading old issue reports or reproducing a test suite: an RC1 behavior may have changed by RC2 or the stable release.
Language bindings and runnable starting points
The release announcement listed .NET, Java, Python, Ruby, and JavaScript bindings. Since it does not state exact RC1 package coordinates or commands for each ecosystem, the examples below are current-style Selenium usage patterns, not verified RC1 installation recipes. Use the package repository and release announcement for historical artifact coordinates if reproducing RC1 specifically.
Python
from selenium import webdriver
# This example uses the installed Selenium binding and browser driver.
# For an RC1 reproduction, install the exact historical candidate artifact first.
driver = webdriver.Firefox()
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
JavaScript
const { Builder } = require('selenium-webdriver');
(async function () {
const driver = await new Builder().forBrowser('firefox').build();
try {
await driver.get('https://example.com');
console.log(await driver.getTitle());
} finally {
await driver.quit();
}
})();
Java and .NET
For Java, add the Selenium Java binding version appropriate to the experiment through Maven, then create a WebDriver for the browser under test. For .NET, use the matching NuGet binding and create the corresponding driver. The RC1 source names Maven and NuGet but does not supply coordinates, commands, or a complete sample, so consult the official Selenium material rather than guessing version strings.
Ruby
The announcement names RubyGems as an installation route. Select the exact candidate gem version from repository history before attempting a historical reproduction; the source does not include a verified gem command or code sample.
Relative locators: when they help
A relative locator describes where a target appears in relation to a reference element. It can make intent readable when the relationship is stable, but it still depends on page layout and can become ambiguous if several matching elements occupy the same relative position. Prefer a stable ID, accessible name, or other direct locator when one is available. If using a relative relationship, make the reference locator unique and assert that the result count or target identity matches expectations.
Network interception and authentication
Network interception is useful when a test needs to observe or alter requests and responses. Keep interception scoped to the test and restore normal behavior afterward so one test does not affect another. The RC1 announcement identifies network interception as a highlight but does not enumerate every supported interception operation for every binding. Check the binding-specific documentation for the exact API available in the candidate you are evaluating.
Basic and digest authentication were also listed in the RC1 announcement. Authentication behavior can depend on browser, server, and binding details. Avoid putting real credentials in source code or logs; use test credentials and the secret-handling mechanism available in your environment.
Driver and upgrade considerations
- For the 2021 RC1 upgrade, the project advised updating drivers first and specifically called for geckodriver 0.29.1 or later.
- Do not apply that historical driver floor as current guidance. Browser and driver compatibility changes over time.
- The stable 4.0.0 announcement said public API compatibility was the upgrade aim from 3.x, while warning that internal or deprecated API use could cause issues.
- Change one component at a time where possible: record the binding, browser, driver, and operating system versions so failures can be isolated.
Troubleshooting historical RC1 experiments
| Symptom | Likely cause | What to check |
|---|---|---|
| Firefox session fails to start | Driver is too old or mismatched for the browser. | For an RC1-era setup, follow the announcement’s geckodriver 0.29.1-or-later advice and verify the browser/driver pairing. |
| Package manager cannot resolve the candidate | The RC1 artifact may no longer be published, or the requested version syntax is wrong. | Check repository version history and the exact binding coordinates; the source does not guarantee present-day availability. |
| Code compiles on Selenium 3 but fails on Selenium 4 | The code may rely on an internal or deprecated API. | Review the migration and stable-release notes, replace unsupported internal calls, and compile against the intended binding version. |
| Network or CDP behavior fails after closing a window | This was a reported release-candidate issue addressed in RC2. | Confirm whether the reproduction uses RC1 or RC2; compare against the RC2 fix before attributing it to the stable release. |
| A relative locator returns the wrong match | The reference element is not unique or the layout has multiple candidates. | Use a unique anchor, narrow the search scope, and assert the selected element before interacting with it. |
| Authentication does not behave consistently | Browser and server behavior may differ, or credentials may be handled outside the mechanism being exercised. | Reduce to a test account and minimal page, verify the scheme, and consult binding-specific docs for that candidate. |
Performance, reliability, and cost
RC1 was a pre-release intended for evaluation and feedback, so treat it as an experiment rather than a stable dependency for production test runs. The source material provides no performance benchmarks, compatibility percentages, or cost figures for RC1. For a useful comparison, run the same representative test suite against the candidate and the stable version in a controlled environment, track failures separately from timing, and include browser and driver versions in the results.
Local Selenium usage has costs associated with the machines, browser instances, and maintenance of the test environment; the cited release announcements do not quantify them. If the task is only to capture a page image rather than interact with a browser, a screenshot API may avoid maintaining browser setup.
Or skip the browser setup
If you only need a webpage screenshot, ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns PNG, JPEG, WebP, or PDF. Cookie banners are accepted and removed, along with 60+ known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for the request options. Python and Node.js callers can use the same endpoint:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await require('node:fs/promises').writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.
FAQ
Was Selenium 4 RC1 a stable release?
No. It was the first release candidate, followed by RC2 and then stable Selenium 4.0.0.
Which languages were supported?
The announcement listed .NET, Java, Python, Ruby, and JavaScript.
Should I install RC1 now?
Only if you have a specific historical reproduction need. Its current artifact availability and compatibility with modern browsers are not established here; use current official Selenium releases for new work.
Did RC1 include every Selenium 4 launch feature?
Do not assume so. The RC1 announcement highlights a narrower set; other capabilities were described in the later stable-release announcement.
Primary sources
- Selenium 4 Release Candidate, September 6, 2021.
- Selenium 4 Release Candidate 2, October 2, 2021.
- Announcing Selenium 4, October 13, 2021.


