From e2b33c6015bc9a2a6bcbb7db4f8219fc69897de8 Mon Sep 17 00:00:00 2001 From: Michael Render Date: Thu, 21 Nov 2024 05:38:04 -0500 Subject: [PATCH] [dotnet] Address warnings for Firefox devtool depreciations (#14786) --- dotnet/src/webdriver/Firefox/FirefoxDriver.cs | 1 + dotnet/src/webdriver/Remote/RemoteWebDriver.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dotnet/src/webdriver/Firefox/FirefoxDriver.cs b/dotnet/src/webdriver/Firefox/FirefoxDriver.cs index 99f9cb3ea68c6..123f0eb6dc545 100644 --- a/dotnet/src/webdriver/Firefox/FirefoxDriver.cs +++ b/dotnet/src/webdriver/Firefox/FirefoxDriver.cs @@ -393,6 +393,7 @@ public Screenshot GetFullPageScreenshot() /// Creates a session to communicate with a browser using the Chromium Developer Tools debugging protocol. /// /// The active session to use to communicate with the Chromium Developer Tools debugging protocol. + [Obsolete("CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi.")] public DevToolsSession GetDevToolsSession() { return GetDevToolsSession(new DevToolsOptions() { ProtocolVersion = FirefoxDevToolsProtocolVersion }); diff --git a/dotnet/src/webdriver/Remote/RemoteWebDriver.cs b/dotnet/src/webdriver/Remote/RemoteWebDriver.cs index 8483eb2fbc3ec..0950c84949ff9 100644 --- a/dotnet/src/webdriver/Remote/RemoteWebDriver.cs +++ b/dotnet/src/webdriver/Remote/RemoteWebDriver.cs @@ -428,7 +428,7 @@ public ReadOnlyCollection FindElementsByCssSelector(string cssSelec /// The active session to use to communicate with the Developer Tools debugging protocol. public DevToolsSession GetDevToolsSession() { - if (this.Capabilities.GetCapability(CapabilityType.BrowserName) == "firefox") + if (this.Capabilities.GetCapability(CapabilityType.BrowserName) is "firefox") { if (_logger.IsEnabled(LogEventLevel.Warn)) {