Free tools Windows power users keep installed

One-click scans. No signup required.

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

There is no single, release-independent list of everything deprecated in Selenium 4. The changes depend on the language binding and the Selenium 4.x version. Some APIs are deprecated but remain available; others have already been removed. This guide covers major migration changes documented by Selenium, with replacements and version details where the project specifies them.

What changed in Selenium 4?

Selenium 4 adopted the W3C WebDriver standard and removed support for the legacy protocol. Selenium’s announcement said most users should not notice a difference, while calling out capabilities and Actions as notable exceptions. Code that relied on internals or APIs already marked deprecated could encounter upgrade problems. See the Selenium 4.0.0 announcement and the official upgrade guide.

The examples below are major documented changes, not an exhaustive inventory across every binding and release. Check the API documentation and release notes for your language and target version before changing a test suite.

Java: replace removed locator helpers and update waits

Locator methods

Java’s old findElementBy* and findElementsBy* helpers were removed. Use the general locator methods with a By strategy instead:

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.
Old call Replacement
driver.findElementById("elementId") driver.findElement(By.id("elementId"))
driver.findElementByCssSelector(".item") driver.findElement(By.cssSelector(".item"))
driver.findElementsByName("email") driver.findElements(By.name("email"))

Use the corresponding By strategy for class name, link text, partial link text, name, tag name, or XPath. For one match, call findElement; for all matches, call findElements.

Timeouts and explicit waits

The documented Java replacements use java.time.Duration instead of a numeric value paired with TimeUnit. For example:

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

// Implicit wait
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));

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

Apply the same Duration-based pattern to FluentWait.withTimeout and pollingEvery when migrating older code.

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 identity and Firefox options

Use Browser.FIREFOX in place of the deprecated BrowserType.FIREFOX. The upgrade guidance also marks Firefox’s legacy setLegacy(true) option deprecated and recommends using GeckoDriver instead.

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

Options merging

In the documented options API, merge returns a new options object. Keep the return value rather than assuming the receiver was mutated:

FirefoxOptions merged = options.merge(otherOptions);

C#: replace AddAdditionalCapability

AddAdditionalCapability is deprecated in C#. Use AddAdditionalOption for additional options. For example, replace:

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.
options.AddAdditionalCapability("cloud:options", cloudOptions, true);

with:

options.AddAdditionalOption("cloud:options", cloudOptions);

Selenium 4 follows W3C conventions for capabilities. Standard names include browserName, browserVersion, platformName, acceptInsecureCerts, pageLoadStrategy, proxy, timeouts, and unhandledPromptBehavior. Nonstandard capabilities need a vendor prefix; check the current format required by the browser or remote-grid provider.

Python: distinguish removed methods from removed arguments

Locator methods removed in 4.3

The find_element_by_* method family was removed in Selenium 4.3. Use find_element with a locator strategy:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from selenium.webdriver.common.by import By

element = driver.find_element(By.ID, "x")
elements = driver.find_elements(By.CSS_SELECTOR, ".item")

Use the relevant By value, such as By.NAME, By.XPATH, or By.CLASS_NAME, for other locator types.

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

Driver arguments removed in 4.10

The Python executable_path and desired_capabilities constructor keyword arguments were removed in Selenium 4.10. Pass a Service object with service= and configure the browser with options=:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options

options = Options()
service = Service("/path/to/chromedriver")
driver = webdriver.Chrome(service=service, options=options)

Where applicable, Selenium Manager can manage the browser driver, so you do not need to hard-code its executable path:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

driver = webdriver.Chrome(options=Options())

Other bindings: check their own migration notes

Do not assume Java, C#, and Python examples apply unchanged to JavaScript or Ruby. Selenium’s upgrade guide has separate JavaScript and Ruby dependency instructions, and its current agent guidance includes additional language-specific API information. Verify the affected binding’s API docs and release notes for the version you use.

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

A practical migration checklist

  1. Identify the binding and exact versions. Record the current and target Selenium versions for each test project; a method removed in a later 4.x release may not be absent from an earlier one.
  2. Search for known legacy calls. Look for Java findElementBy*/findElementsBy*, Python find_element_by_*, Python constructor keywords executable_path and desired_capabilities, C# AddAdditionalCapability, and old Java timeout signatures.
  3. Use the replacement for that binding. Apply the locator, Duration, Service/options, or additional-option pattern shown above.
  4. Review capabilities and remote-grid settings. Confirm standard capability names and the provider’s vendor-prefixed options format.
  5. Run the suite against the actual target version. Fix compile-time or runtime failures and consult that binding’s API documentation and release notes for APIs not covered here.

Why older Selenium 2 suites may fail on Selenium 4 Grid

In a 2022 article, Selenium described having intended to support both protocols in Grid and Java bindings across Selenium 4.x, but reported more failures than expected when Selenium 2 suites ran on Selenium 4 Grid. The article is historical context, not a guarantee about current support for every API or binding; it also noted that removed functionality had already been marked deprecated in the latest Java Selenium at that time. Read the legacy protocol support article alongside current migration notes.

How to verify the current Selenium 4 version

Selenium’s downloads page is dynamic. At the time represented by the available release listing, Java, .NET/C#, and Ruby showed stable 4.49.0 dated September 9, 2026. That listing does not establish the current version for every binding or a future date. Check the Selenium downloads page and your binding’s release notes before upgrading.

Or skip the browser setup

If your task is to capture a page rather than maintain a browser automation suite, ScreenshotNeo offers a screenshot API and MCP server. A single GET request can return an image or PDF; it is separate from Selenium’s WebDriver APIs and does not replace Selenium for interactive tests. See ScreenshotNeo and its 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, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.

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

Frequently Asked Questions

Were all deprecated Selenium APIs removed in Selenium 4.0?

No. Deprecation and removal vary by API, binding, and 4.x release; some listed changes were removed in later 4.x versions.

Is this a complete list of every Selenium 4 deprecation?

No. These are major documented migration examples; consult the API documentation and release notes for your binding and target version.

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.