Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To fix Selenium’s CDP version mismatch warning in Java, first check the browser version and the Selenium version your build actually resolved, then update the project to use one consistent, current selenium-java release. If your code needs a particular Chrome DevTools Protocol (CDP) version, add the matching Selenium CDP module intentionally; for supported event-driven features, consider WebDriver BiDi instead. The warning is not, by itself, proof that ordinary WebDriver commands or browser startup have failed.
What the CDP version mismatch warning means
Selenium’s Java bindings include generated classes for Chrome DevTools Protocol features. CDP is browser-specific and changes between browser versions, so Selenium must match the browser’s protocol to an implementation available on the project’s classpath. Selenium’s CDP documentation describes this support as temporary: “CDP support is temporary until WebDriver BiDi has been implemented.”
The Java API’s CdpVersionFinder searches for a matching implementation. It can select the closest available version; if none is found, it returns NoOpCdpInfo. In practical terms, that means CDP-specific calls may be unavailable or may not behave as expected. The warning alone does not say that every WebDriver operation is broken: the effect depends on whether your test uses the missing or incompatible CDP commands.
Distinguish this from a ChromeDriver session-creation failure. The CDP warning concerns Selenium’s Java protocol bindings. A driver startup error concerns communication between the browser and its driver and may have a separate cause.
Check the versions your Java project is actually using
Before changing dependencies, record the full Chrome or Chromium version, the resolved Selenium version, and—if the browser session will not start—the ChromeDriver major version. A dependency declared in a build file is not necessarily the version that ends up on the runtime classpath, particularly when older transitive dependencies or mixed Selenium module versions are present.
Maven: inspect resolved Selenium dependencies
From the project directory, run:
mvn dependency:tree -Dincludes=org.seleniumhq.selenium
Look for multiple versions of Selenium artifacts. If your project uses the Selenium Java bundle, check that selenium-java and any explicitly declared Selenium modules resolve consistently rather than introducing an older version alongside it.
Gradle: inspect the runtime classpath
Run:
./gradlew dependencyInsight --dependency selenium --configuration runtimeClasspath
If the project uses a different runtime configuration, inspect that configuration instead. The goal is to find the Selenium modules and versions the test process actually loads, not just the text in a build file.
Rank #2
Record browser and driver versions
Check the browser’s full version in its About page or with the browser’s version command. Record the major number as well. If ChromeDriver cannot create a session, also check the driver version. Selenium’s Chrome setup guidance says Chrome and ChromeDriver must match in major version. That requirement is independent of which CDP module is on your Java classpath.
Update Selenium Java consistently
The most practical first fix is to upgrade Selenium and refresh dependency resolution so the build uses a single, consistent release. Selenium’s Java installation page currently shows Selenium 4.49.0 in its example project. Treat that as the version shown by the documentation at the time it was reviewed, not as a promise that it covers every later browser release. Selenium says its generated CDP support covers the three most recent Chrome versions at a time, so support moves as browsers and Selenium releases change.
Maven example
Set the dependency to one Selenium release, then resolve and inspect the tree again. This uses the documentation’s example version; choose a current release appropriate to your project when applying it:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.49.0</version>
</dependency>
Refresh Maven’s dependency resolution and rerun the dependency tree command. If your build separately declares Selenium modules, align their versions with the bundle instead of leaving a stale transitive module in place.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchGradle example
Use one version for the Selenium Java dependency and resolve the build again:
dependencies {
testImplementation("org.seleniumhq.selenium:selenium-java:4.49.0")
}
As with Maven, the shown version is the current documentation example in the reviewed Selenium installation page, not a guarantee of coverage for every browser. After changing the dependency, rerun dependencyInsight and confirm that the runtime classpath reflects the intended version.
Rank #4
If your test needs a specific CDP version
Updating selenium-java may be enough when your code uses supported features and the bundled generated classes cover the browser you run. If you explicitly need domains from a particular CDP version, Selenium’s Java Domains API advises depending on that version and using its domains directly.
Choose the artifact version using the browser version, the Selenium release, and the module versions available for that release. The browser version and dependency tree are project-specific, so there is no safe universal module suffix to paste into every build. Avoid mixing arbitrary Selenium release numbers or copying an old dependency snippet without verifying that the module exists and is compatible with the rest of the classpath.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Identify the browser’s full version and major version.
- Check the Selenium Java release and the resolved modules in the build.
- Determine which CDP domain and commands your code actually uses.
- Verify the specific versioned module against the Selenium API and artifact information for your chosen release.
- Align the added module with the rest of the Selenium dependencies, then rebuild and test the CDP operation that needs it.
When WebDriver BiDi is the better direction
For supported console logs, JavaScript errors, and network interception, Selenium’s current guidance points developers toward WebDriver BiDi. BiDi is the standards-based, cross-browser direction; CDP is Chromium-only and its methods vary across browser versions. This can reduce dependence on a specific Chrome protocol version, but migration is not automatic: confirm that the Java binding and the browser you automate support the exact operation you need.
Best Value
Use this decision guide:
- Keep the bundled CDP support when the required operation is available and the browser is within the CDP coverage of your Selenium release.
- Add a specific CDP module when your feature explicitly requires a protocol domain or version and remains Chrome-specific.
- Evaluate BiDi when the needed event-driven feature is supported and cross-browser portability matters.
Keep ChromeDriver errors separate from CDP warnings
If Selenium cannot create a browser session, investigate Chrome and ChromeDriver compatibility separately. Selenium’s Chrome guidance requires their major versions to match. Updating ChromeDriver can address a driver/browser mismatch, but it does not add a missing generated CDP implementation to Selenium’s Java classpath.
If the session starts and only CDP-related functionality fails, inspect Selenium’s resolved Java dependencies and the CDP version available to them. Do not treat a driver update as a substitute for aligning Selenium’s CDP support.
Troubleshooting common failure cases
The warning remains after upgrading Selenium
- Cause: The build still resolves an older Selenium module, or different Selenium artifacts have different versions.
- Fix: Inspect Maven’s dependency tree or Gradle’s runtime dependency insight, align the Selenium modules, refresh dependency resolution, and rebuild.
The warning appears, but ordinary WebDriver commands work
- Cause: The warning is about CDP implementation availability; it does not establish that basic WebDriver commands have failed.
- Fix: Run the specific CDP-dependent feature your test needs. If it does not use CDP, determine whether the warning corresponds to a real test requirement before changing protocol-specific code.
A CDP command or event is missing
- Cause: The generated implementation on the classpath may not include the domain or version your code requires.
- Fix: Check the required domain, then use a compatible versioned CDP module intentionally or migrate to an available BiDi operation.
ChromeDriver cannot create a session
- Cause: Chrome and ChromeDriver may have different major versions, or another driver/browser startup issue may be present.
- Fix: Compare their major versions and follow Selenium’s Chrome setup guidance. Treat this as a separate problem from the CDP dependency warning.
Suppressing the log makes the build look clean
- Cause: Hiding the warning changes log output, not the protocol implementation or compatibility.
- Fix: Align the Selenium/CDP dependencies, add the needed CDP version, or use supported BiDi functionality. Only suppress logging if you have separately established that the warning is irrelevant to the test’s behavior.
Or skip the browser setup
If your task is simply to save a page screenshot rather than run browser automation or use Selenium-specific CDP features, ScreenshotNeo offers a website screenshot API and MCP server for developers. A single GET request returns a PNG, JPEG, WebP, or PDF. See the API documentation for parameters and options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks and 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 provides take_screenshot, get_page_info, and capture_pdf tools for 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 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does the CDP version mismatch warning mean Selenium cannot run Chrome?
Not necessarily. It means Selenium did not find an exact generated CDP implementation for the browser version; ordinary WebDriver commands may still work.
Will updating ChromeDriver fix a missing Selenium CDP module?
No. ChromeDriver and Chrome major-version alignment is a separate startup compatibility issue; it does not add CDP classes to the Java classpath.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →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.

