Skip to content

Commit e2b33c6

Browse files
[dotnet] Address warnings for Firefox devtool depreciations (#14786)
1 parent 0954cca commit e2b33c6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dotnet/src/webdriver/Firefox/FirefoxDriver.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ public Screenshot GetFullPageScreenshot()
393393
/// Creates a session to communicate with a browser using the Chromium Developer Tools debugging protocol.
394394
/// </summary>
395395
/// <returns>The active session to use to communicate with the Chromium Developer Tools debugging protocol.</returns>
396+
[Obsolete("CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi.")]
396397
public DevToolsSession GetDevToolsSession()
397398
{
398399
return GetDevToolsSession(new DevToolsOptions() { ProtocolVersion = FirefoxDevToolsProtocolVersion });

dotnet/src/webdriver/Remote/RemoteWebDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByCssSelector(string cssSelec
428428
/// <returns>The active session to use to communicate with the Developer Tools debugging protocol.</returns>
429429
public DevToolsSession GetDevToolsSession()
430430
{
431-
if (this.Capabilities.GetCapability(CapabilityType.BrowserName) == "firefox")
431+
if (this.Capabilities.GetCapability(CapabilityType.BrowserName) is "firefox")
432432
{
433433
if (_logger.IsEnabled(LogEventLevel.Warn))
434434
{

0 commit comments

Comments
 (0)