Selenium 4 Release Candidate: What’s New
A historical guide to Selenium 4 RC1: its headline features, Selenium 3 migration changes, and what developers should check before upgrading today.
Selenium 4 RC1 was the first release candidate for Selenium 4, announced on September 6, 2021. Its announcement highlighted relative locators, network traffic interception, and basic or digest authentication. It was a pre-release milestone, not a current Selenium version or an exhaustive list of everything that changed in Selenium 4.
This guide explains what the RC1 announcement covered, how Selenium 4 changed the WebDriver protocol and migration surface, and how to approach those changes today. For present-day installation and compatibility instructions, use the current Selenium documentation and official Selenium 4 upgrade guide.
1. What Selenium 4 RC1 was
The Selenium project announced RC1 on September 6, 2021, describing it as the first release candidate. Bindings were shipped for .NET, Java, Python, Ruby, and JavaScript. A release candidate is a pre-release build intended for final validation before a stable release; it should not be confused with the current stable release. Selenium’s RC1 announcement named three headline areas:
- Relative locators, for describing an element’s position in relation to another element.
- Network traffic interception, for intercepting browser requests and responses through Selenium’s APIs.
- Basic and digest authentication, called out as an authentication capability.
These were the announcement’s highlights, not a complete inventory of Selenium 4 changes. Details could vary by binding and release-candidate version.
2. Relative locators: find elements by position
Traditional locators identify an element by a property such as its ID, accessible name, CSS selector, or XPath. Relative locators let a test express a spatial relationship to an element that can already be located—for example, a button below a heading or an input to the left of a label. This can make a test readable when the relationship is meaningful and stable.
Conceptual Java example (the exact API available depends on the Selenium binding and version):
// Locate a known label, then find an input positioned below it.
WebElement emailLabel = driver.findElement(By.id("email-label"));
WebElement emailInput = driver.findElement(
RelativeLocator.with(By.tagName("input")).below(emailLabel)
);
emailInput.sendKeys("developer@example.com");
Check the API documentation for your language and installed Selenium version before copying a relative-locator example into a project. The JavaScript WebDriver changelog specifically records that RC1 added relative locators for all By types; that entry describes JavaScript binding history and should not be assumed to enumerate every binding’s RC behavior.
When relative locators help—and when they do not
- Use them when a human-readable spatial relationship reflects the page’s structure and is unlikely to change independently of the target.
- Prefer stable IDs, accessible names, or explicit test attributes when available. A positional relationship can become ambiguous if responsive layout or page content changes.
- If several elements match the relation, make the anchor or target locator more specific and verify which match the API returns.
- For dynamic pages, wait for the relevant elements to be present and laid out before relying on a spatial relationship.
3. Network interception and authentication
Network interception gives automation code a way to observe or affect browser traffic, which can support scenarios such as inspecting requests or controlling a response during a test. Selenium’s RC1 announcement called this out as a headline feature. The JavaScript changelog places an entry for implementing network request interception in RC2, so do not infer that every language had the same interception implementation in RC1.
The announcement also highlighted basic or digest authentication. The exact setup and support depend on the browser, driver, binding, and Selenium version. Consult the API documentation for the binding in use rather than assuming one cross-language code sample applies everywhere.
For both capabilities, decide whether the test needs browser-level behavior. If the goal is only to fetch a page or save a screenshot, a full browser automation stack may be unnecessary. If the test needs to interact with the rendered page, Selenium remains the relevant kind of tool.
4. What changed from Selenium 3 to Selenium 4
The key migration change is the WebDriver protocol. Selenium 4 removes legacy JSON Wire Protocol support and uses W3C WebDriver by default. The official upgrade guide says Selenium 3 code that already conforms to W3C WebDriver should continue to work, but calls out capabilities and the Actions class as areas to review.
| Area | What to know when upgrading |
|---|---|
| Protocol | Legacy JSON Wire Protocol support is removed; Selenium 4 uses W3C WebDriver. |
| Capabilities | Use standard W3C capability names where applicable. Nonstandard browser or vendor capabilities need a vendor prefix. |
| Actions | Review code that uses the Actions class against the upgrade guide and the APIs for your binding. |
| Release status | RC1 was a 2021 pre-release. Use current Selenium documentation for current installation and compatibility guidance. |
Standard capability names listed in the migration guidance include browserName, browserVersion, platformName, acceptInsecureCerts, pageLoadStrategy, proxy, timeouts, and unhandledPromptBehavior. A vendor-specific capability should follow the relevant vendor’s documented prefix convention; do not pass an unprefixed custom capability and assume it will be accepted.
5. A safe upgrade workflow
- Identify the actual dependency and binding. Record the Selenium language binding, browser, driver, Grid setup if any, and the versions currently pinned in the project.
- Read current installation and compatibility docs. RC1’s setup note is historical. Check the current Selenium and browser-driver documentation for supported combinations.
- Audit capabilities. Replace legacy or nonstandard capability usage with W3C-compatible names and vendor-prefixed custom capabilities as required by the browser vendor.
- Review Actions usage. Check interactions involving pointer, keyboard, or wheel input against the current binding documentation.
- Upgrade in a branch and run a focused suite. Start with tests that create sessions, set capabilities, perform actions, and use any browser-specific features.
- Expand validation. Run the full suite across the browsers and environments your project supports, then update the dependency lockfile and CI image or Grid configuration as needed.
The RC1 announcement advised updating required drivers before changing the Selenium dependency and specifically mentioned geckodriver 0.29.1 or later. That was advice in a 2021 announcement, not a current driver recommendation. Verify driver requirements using current documentation before upgrading.
6. JavaScript changelog details: keep the scope clear
The JavaScript WebDriver changelog records relative locator support across By types in its RC1 section. Its RC2 section records network request interception, a websocketUrl capability, and a check for the Grid CDP endpoint. These are JavaScript binding changelog entries. They provide useful historical detail, but are not a complete release inventory or a guarantee that other language bindings had identical features in the same RC.
7. Troubleshooting Selenium 4 migration
| Symptom | Likely cause | What to check |
|---|---|---|
| Session creation fails after upgrading | A capability is invalid, uses legacy protocol assumptions, or lacks a vendor prefix. | Inspect the session error and capability payload; use standard W3C names and the browser vendor’s documented prefix for custom capabilities. |
| Browser or driver session cannot start | The installed browser, driver, Selenium binding, or Grid combination is incompatible. | Check current Selenium and driver compatibility documentation. Do not apply the RC1-era geckodriver note as current guidance. |
| Actions behave differently or fail | Code relies on older Actions behavior or binding-specific APIs. | Review the Selenium 4 upgrade guide and the current Actions API docs for your binding; reduce the issue to a focused interaction test. |
| Relative locator finds an unexpected element | Multiple elements satisfy the spatial relation, or the page has not finished laying out. | Narrow the target locator, use a more specific anchor, wait until relevant elements are visible, and prefer a stable direct locator when one exists. |
| Interception example or API is missing | The feature’s availability differs by binding, browser, or release candidate; some JavaScript changes are recorded under RC2. | Confirm the installed binding’s version and consult its documentation or changelog rather than copying another binding’s API. |
8. Performance, reliability, and cost considerations
The cited release and migration sources do not provide version-by-version performance measurements, so there is no supported basis here for claiming Selenium 4 RC1 is faster or slower than Selenium 3. For reliable migration, pin dependency versions, record browser and driver versions in CI, and validate protocol, capability, and interaction changes separately. Relative locators can improve readability but may be less robust than stable identifiers when layout changes. Network interception adds control to tests, but should only be introduced where the test needs it.
Selenium is an open-source browser automation project; the cited sources do not establish a Selenium license or infrastructure cost schedule. In practice, budget for the machines, browsers, Grid capacity, and engineering time your test environment requires. Keep measurements specific to your workload rather than treating an RC announcement as a benchmark.
9. Or skip the browser setup
If the task is to capture a page image rather than interact with it as part of a browser test, ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. See the 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
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 Bun.write('shot.webp', res);
- Cookie banners are accepted and removed before capture; known consent platforms, newsletter popups, and chat widgets can be removed, with each step able to be turned off.
- Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers report the page verdict and billing status.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Create a free ScreenshotNeo account for 1,000 screenshots a month, with no card required.
10. Frequently asked questions
Is Selenium 4 RC1 the current Selenium release?
No. RC1 was announced in September 2021 as the first release candidate. Check Selenium’s release archive and current documentation for present-day versions and instructions.
Did Selenium 4 RC1 support every feature in every language binding?
Do not assume identical RC behavior across bindings. For example, the JavaScript changelog places network request interception in RC2, while the announcement presents it as a headline area for Selenium 4.
Can Selenium 3 code run with Selenium 4?
The official upgrade guide says W3C-compliant Selenium 3 code should continue to work. Review capabilities and Actions usage, and validate against your current browser and driver setup.
Should I install geckodriver 0.29.1 or later?
That was the RC1 announcement’s 2021 recommendation. Use current Selenium and browser-driver documentation for today’s version requirements.
Sources
- Selenium 4 Release Candidate, Selenium Project, September 6, 2021.
- JavaScript WebDriver changelog, SeleniumHQ.
- Upgrade to Selenium 4, Selenium Project.
- Selenium release archive.


