diff --git a/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java b/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java index 91c25138c23df..c63e2f153eaf1 100644 --- a/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java +++ b/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java @@ -91,9 +91,11 @@ public static Optional getReportedUri(Capabilities caps) { break; case "firefox": key = "moz:debuggerAddress"; - LOG.warning( - "CDP support for Firefox is deprecated and will be removed in future versions. " - + "Please switch to WebDriver BiDi."); + if (!caps.is("webSocketUrl")) { + LOG.warning( + "CDP support for Firefox is deprecated and will be removed in future versions. " + + "Please switch to WebDriver BiDi."); + } break; default: return Optional.empty(); diff --git a/java/src/org/openqa/selenium/firefox/FirefoxDriver.java b/java/src/org/openqa/selenium/firefox/FirefoxDriver.java index 01ec605d2fa08..9d48f66fbab85 100644 --- a/java/src/org/openqa/selenium/firefox/FirefoxDriver.java +++ b/java/src/org/openqa/selenium/firefox/FirefoxDriver.java @@ -165,7 +165,7 @@ private FirefoxDriver( Optional reportedUri = CdpEndpointFinder.getReportedUri("moz:debuggerAddress", capabilities); - if (reportedUri.isPresent()) { + if (reportedUri.isPresent() && !capabilities.is("webSocketUrl")) { LOG.warning( "CDP support for Firefox is deprecated and will be removed in future versions. " + "Please switch to WebDriver BiDi.");