What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For many projects, upgrading from Selenium 3 to Selenium 4 starts with updating the language binding. Before calling the migration complete, check that your capabilities use the W3C WebDriver format, replace deprecated or internal API usage, and build and run the suite against your supported browsers. Selenium says W3C-compliant code from late Selenium 3 should work as expected, but older APIs and nonstandard capabilities can still cause failures.

The Selenium downloads page lists 4.49.0 as the stable release for the core bindings and Grid, with the binding release dated September 9, 2026. Releases continue to change, so check Selenium downloads and the release notes for your chosen version when you upgrade.

Before you upgrade

Record the versions and configuration you need to reproduce a test run. That gives you a useful baseline if a session stops starting or a test behaves differently after the dependency change.

  • Your Selenium binding and language/runtime version.
  • The browser versions used locally and in CI.
  • How the browser driver is installed or located.
  • Any remote WebDriver, Grid, or cloud-provider setup, including its capabilities.
  • Places in the codebase that use deprecated methods or Selenium internals.

The official migration guide covers Java, C#, Python, Ruby, and JavaScript. Its package examples are from an earlier Selenium 4 release; use your package manager’s current version information rather than copying those historical pins. See Selenium’s upgrade guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Update the Selenium dependency

Choose the update command for your project and package manager. The following examples pin the version listed on Selenium’s downloads page on October 4, 2026; check that page again before using them.

Binding Example update
Java with Maven <dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-java</artifactId><version>4.49.0</version></dependency>
Python python -m pip install "selenium==4.49.0"
.NET/C# dotnet add package Selenium.WebDriver --version 4.49.0
JavaScript npm install selenium-webdriver@4.49.0
Ruby gem install selenium-webdriver -v 4.49.0

These are dependency-update examples, not a guarantee that every project uses these package names, build tools, or versioning policies. Update the dependency declaration or lockfile that your project actually uses, then restore packages and build or compile before changing test behavior.

Check W3C capabilities before debugging session startup

Selenium 4 uses the W3C WebDriver protocol; it no longer supports the legacy JSON Wire Protocol. If a new session fails after the upgrade, inspect the capabilities sent to the browser, Grid, or remote provider. Use standard W3C names where applicable:

Use Instead of
browserVersion version
platformName platform

Other standard capability names documented in the migration guide include browserName, acceptInsecureCerts, pageLoadStrategy, proxy, timeouts, and unhandledPromptBehavior. A non-W3C capability structure can prevent a session from starting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Browser vendors and cloud testing services may require additional capabilities. Their keys need the provider’s required vendor prefix and nesting; the migration guide uses a generic block such as cloud:options as an illustration, not a universal key. Check the exact syntax in the documentation for the service you use: Selenium’s capability migration notes.

Fix binding-specific API changes

The examples below cover documented migration changes, not every change that may apply to every Selenium 4 release. Use the compiler or runtime error to identify affected code, then check the API reference and release notes for your exact target version.

Java: use Duration for timeouts

Timeout APIs that previously accepted a number and TimeUnit now use java.time.Duration. The same applies to WebDriverWait, withTimeout, and pollingEvery.

import java.time.Duration;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

When merging Firefox options with capabilities, assign the returned value rather than assuming the existing options object is modified in place:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
FirefoxOptions options = new FirefoxOptions();
options = options.merge(capabilities);

The migration guide also marks legacy Firefox mode as deprecated and recommends Browser instead of the deprecated BrowserType.

C#: replace the deprecated additional-capability method

For the options case covered by Selenium’s guide, replace AddAdditionalCapability with AddAdditionalOption:

var options = new ChromeOptions();
options.AddAdditionalOption("someOption", "someValue");

Use the actual option name, value, and browser options class required by your configuration; the sample shows the API shape, not a provider-specific capability.

Python: pass a Service object instead of executable_path

Driver constructors no longer use executable_path in the documented migration example. Create a service object and pass it to the driver instead:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service("/path/to/chromedriver")
driver = webdriver.Chrome(service=service)
try:
    driver.get("https://example.com")
    print(driver.title)
finally:
    driver.quit()

Replace the example path with your driver’s real location. If your driver is available through PATH, you can also construct the service without an explicit executable path.

Ruby and JavaScript: update the package and check runtime failures

Update the selenium-webdriver gem or npm package using the version policy for the application, then run the test suite. Selenium’s migration guide documents dependency updates for these bindings; its sample pins are historical, so do not treat them as current version recommendations.

Choose how to manage browser drivers

You do not have to redesign driver installation just because you moved to Selenium 4. The browser and its driver executable—such as ChromeDriver, GeckoDriver, or EdgeDriver—must still be available through a working setup. Selenium Manager is bundled with Selenium releases from 4.6 and is used as a fallback when a binding cannot find a driver. Existing manual management and third-party managers are also supported choices. See Selenium Manager documentation.

Approach When it may fit What to validate
Manual provisioning Your team deliberately pins and installs browser and driver versions. Confirm the executable location and version in local and CI environments.
Selenium Manager fallback You want Selenium to help locate or manage a driver when one is not already available. Test the setup in the actual CI/container environment and verify the browser-driver combination used by your tests.
Third-party manager Your project already uses a separate driver-management tool. Confirm it remains configured and that its behavior matches your browser version policy.

The documentation confirms these approaches but does not prescribe one for every project. Keep your existing approach if it works for your version and environment; test it rather than assuming local success guarantees CI success.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Build, run, and validate the migration in stages

  1. Restore dependencies and compile. Fix direct compiler errors first, especially binding-specific API changes and removed methods.
  2. Run one representative local test. Confirm that the browser launches, a session is created, navigation works, and the test can find and interact with an element.
  3. Check capabilities and driver configuration if startup fails. Verify W3C names and provider-specific options, then confirm the browser and driver are available through the chosen management strategy.
  4. Run the full suite. Exercise the browser, runtime, and remote/Grid combinations your project supports; a single local passing test does not validate the whole matrix.
  5. Read release notes for the exact Selenium version. Selenium 4 is not one frozen API surface: the 4.49.0 release notes, for example, announce removal of a deprecated Java file endpoint. See Selenium 4.49 release notes.

Troubleshooting common upgrade failures

WebDriver session will not start

  • Likely cause: Legacy JSON Wire Protocol or non-W3C capability names or structure.
  • Fix: Replace legacy names such as version and platform with browserVersion and platformName where appropriate. Check vendor-prefixed options against the remote provider’s instructions.

Driver executable cannot be found

  • Likely cause: A previous manual path or system property no longer points to a usable driver, or the CI environment differs from the local machine.
  • Fix: Check the executable path and environment, or test Selenium Manager’s fallback with the project’s actual browser setup. Selenium Manager is included starting with Selenium 4.6; older Selenium 4 versions do not include it.

Compilation fails on timeout or wait code

  • Likely cause: Java code still uses the older number-and-TimeUnit timeout signature.
  • Fix: Pass Duration, for example Duration.ofSeconds(10), to the affected timeout or wait API.

Python rejects executable_path

  • Likely cause: Driver construction still uses the old executable_path argument.
  • Fix: Create the relevant Service object and pass it to the driver, or make the driver available on PATH.

Tests compile but fail at runtime

  • Likely cause: Tests depend on deprecated or internal Selenium APIs, a changed binding API, or assumptions about a remote provider’s capabilities.
  • Fix: Identify the first failing call or session request, consult the migration guide for that binding, and check the target version’s release notes. Do not assume a successful compile proves the suite is compatible.

Optional: explore relative locators after migration

Relative locators are a Selenium 4 feature for finding an element by its position in relation to a known element—for example, above, below, or beside it. Selenium determines position and size using browser geometry. They are an optional way to express certain element relationships, not a prerequisite for upgrading an existing suite. Read Selenium’s locator strategies documentation after the existing tests pass.

Or skip the browser setup

If your goal is to capture website screenshots rather than migrate Selenium browser tests, ScreenshotNeo provides a screenshot API and MCP server for developers. A single request can return an image or PDF:

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 request options. It accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for 1,000 free screenshots a month, with no card required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Do I need to adopt relative locators to finish a Selenium 4 migration?

No. They are an optional locator feature; existing tests can keep their current locator strategies.

Does Selenium Manager replace every driver-management tool?

No. It is a bundled fallback from Selenium 4.6 onward; manual provisioning and third-party managers remain supported options.

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.