Skip to content

Commit b69bd01

Browse files
committed
remove nullability from FirefoxDriver
1 parent d4ba4df commit b69bd01

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

dotnet/src/webdriver/Firefox/FirefoxDriver.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,11 @@
2222
using System;
2323
using System.Collections.Generic;
2424
using System.Collections.ObjectModel;
25-
using System.Diagnostics.CodeAnalysis;
2625
using System.Globalization;
2726
using System.IO;
2827
using System.IO.Compression;
2928
using System.Threading.Tasks;
3029

31-
#nullable enable
32-
3330
namespace OpenQA.Selenium.Firefox
3431
{
3532
/// <summary>
@@ -113,7 +110,7 @@ public class FirefoxDriver : WebDriver, IDevTools
113110
{ GetFullPageScreenshotCommand, new HttpCommandInfo(HttpCommandInfo.GetCommand, "/session/{sessionId}/moz/screenshot/full") }
114111
};
115112

116-
private DevToolsSession? devToolsSession;
113+
private DevToolsSession devToolsSession;
117114

118115
/// <summary>
119116
/// Initializes a new instance of the <see cref="FirefoxDriver"/> class.
@@ -250,7 +247,6 @@ public override IFileDetector FileDetector
250247
/// <summary>
251248
/// Gets a value indicating whether a DevTools session is active.
252249
/// </summary>
253-
[MemberNotNullWhen(true, nameof(devToolsSession))]
254250
public bool HasActiveDevToolsSession
255251
{
256252
get { return this.devToolsSession != null; }
@@ -264,7 +260,7 @@ public bool HasActiveDevToolsSession
264260
public FirefoxCommandContext GetContext()
265261
{
266262
FirefoxCommandContext output;
267-
string? response = this.Execute(GetContextCommand, null).Value.ToString();
263+
string response = this.Execute(GetContextCommand, null).Value.ToString();
268264

269265
bool success = Enum.TryParse<FirefoxCommandContext>(response, true, out output);
270266
if (!success)
@@ -389,7 +385,7 @@ public void UninstallAddOn(string addOnId)
389385
public Screenshot GetFullPageScreenshot()
390386
{
391387
Response screenshotResponse = this.Execute(GetFullPageScreenshotCommand, null);
392-
string base64 = screenshotResponse.Value.ToString()!;
388+
string base64 = screenshotResponse.Value.ToString();
393389
return new Screenshot(base64);
394390
}
395391

@@ -426,7 +422,7 @@ public DevToolsSession GetDevToolsSession(DevToolsOptions options)
426422
throw new WebDriverException("Cannot find " + FirefoxDevToolsCapabilityName + " capability for driver");
427423
}
428424

429-
string? debuggerAddress = this.Capabilities.GetCapability(FirefoxDevToolsCapabilityName).ToString();
425+
string debuggerAddress = this.Capabilities.GetCapability(FirefoxDevToolsCapabilityName).ToString();
430426
try
431427
{
432428
DevToolsSession session = new DevToolsSession(debuggerAddress, options);

0 commit comments

Comments
 (0)