diff --git a/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java b/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java index aab44f536d598..91c25138c23df 100644 --- a/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java +++ b/java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java @@ -91,6 +91,9 @@ 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."); 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 1745564ffdaf8..a6beac5461e85 100644 --- a/java/src/org/openqa/selenium/firefox/FirefoxDriver.java +++ b/java/src/org/openqa/selenium/firefox/FirefoxDriver.java @@ -164,6 +164,13 @@ private FirefoxDriver( Optional reportedUri = CdpEndpointFinder.getReportedUri("moz:debuggerAddress", capabilities); + + if (reportedUri.isPresent()) { + LOG.warning( + "CDP support for Firefox is deprecated and will be removed in future versions. " + + "Please switch to WebDriver BiDi."); + } + Optional client = reportedUri.map(uri -> CdpEndpointFinder.getHttpClient(factory, uri)); Optional cdpUri; diff --git a/javascript/node/selenium-webdriver/lib/webdriver.js b/javascript/node/selenium-webdriver/lib/webdriver.js index e004e4505c1e4..2c6a9aa48e259 100644 --- a/javascript/node/selenium-webdriver/lib/webdriver.js +++ b/javascript/node/selenium-webdriver/lib/webdriver.js @@ -1230,6 +1230,12 @@ class WebDriver { const caps = await this.getCapabilities() + if (caps['map_'].get('browserName') === 'firefox') { + console.warn( + 'CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi.', + ) + } + if (process.env.SELENIUM_REMOTE_URL) { const host = new URL(process.env.SELENIUM_REMOTE_URL).host const sessionId = await this.getSession().then((session) => session.getId())