Skip to content

Commit 65841e5

Browse files
committed
[dotnet] Do not warn when passing in null driver paths to driver service
1 parent e356610 commit 65841e5

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

dotnet/src/webdriver/Chrome/ChromeDriverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static ChromeDriverService CreateDefaultService()
6363
/// </summary>
6464
/// <param name="driverPath">The path to the executable or the directory containing the ChromeDriver executable.</param>
6565
/// <returns>A ChromeDriverService using a random port.</returns>
66-
public static ChromeDriverService CreateDefaultService(string driverPath)
66+
public static ChromeDriverService CreateDefaultService(string? driverPath)
6767
{
6868
string fileName;
6969
if (File.Exists(driverPath))
@@ -85,7 +85,7 @@ public static ChromeDriverService CreateDefaultService(string driverPath)
8585
/// <param name="driverPath">The directory containing the ChromeDriver executable.</param>
8686
/// <param name="driverExecutableFileName">The name of the ChromeDriver executable file.</param>
8787
/// <returns>A ChromeDriverService using a random port.</returns>
88-
public static ChromeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
88+
public static ChromeDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
8989
{
9090
return new ChromeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
9191
}

dotnet/src/webdriver/Edge/EdgeDriverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static EdgeDriverService CreateDefaultService()
7474
/// </summary>
7575
/// <param name="driverPath">The directory containing the EdgeDriver executable.</param>
7676
/// <returns>An EdgeDriverService using a random port.</returns>
77-
public static EdgeDriverService CreateDefaultService(string driverPath)
77+
public static EdgeDriverService CreateDefaultService(string? driverPath)
7878
{
7979
string fileName;
8080
if (File.Exists(driverPath))
@@ -96,7 +96,7 @@ public static EdgeDriverService CreateDefaultService(string driverPath)
9696
/// <param name="driverPath">The directory containing the EdgeDriver executable.</param>
9797
/// <param name="driverExecutableFileName">The name of the EdgeDriver executable file.</param>
9898
/// <returns>A EdgeDriverService using a random port.</returns>
99-
public static EdgeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
99+
public static EdgeDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
100100
{
101101
return new EdgeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
102102
}

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static FirefoxDriverService CreateDefaultService()
194194
/// </summary>
195195
/// <param name="driverPath">The path to the executable or the directory containing the Firefox driver executable.</param>
196196
/// <returns>A FirefoxDriverService using a random port.</returns>
197-
public static FirefoxDriverService CreateDefaultService(string driverPath)
197+
public static FirefoxDriverService CreateDefaultService(string? driverPath)
198198
{
199199
string fileName;
200200
if (File.Exists(driverPath))
@@ -216,7 +216,7 @@ public static FirefoxDriverService CreateDefaultService(string driverPath)
216216
/// <param name="driverPath">The directory containing the Firefox driver executable.</param>
217217
/// <param name="driverExecutableFileName">The name of the Firefox driver executable file.</param>
218218
/// <returns>A FirefoxDriverService using a random port.</returns>
219-
public static FirefoxDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
219+
public static FirefoxDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
220220
{
221221
return new FirefoxDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
222222
}

dotnet/src/webdriver/IE/InternetExplorerDriverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static InternetExplorerDriverService CreateDefaultService()
138138
/// </summary>
139139
/// <param name="driverPath">The path to the executable or the directory containing the <c>IEDriverServer</c> executable.</param>
140140
/// <returns>A InternetExplorerDriverService using a random port.</returns>
141-
public static InternetExplorerDriverService CreateDefaultService(string driverPath)
141+
public static InternetExplorerDriverService CreateDefaultService(string? driverPath)
142142
{
143143
string fileName;
144144
if (File.Exists(driverPath))
@@ -160,7 +160,7 @@ public static InternetExplorerDriverService CreateDefaultService(string driverPa
160160
/// <param name="driverPath">The directory containing the <c>IEDriverServer</c> executable.</param>
161161
/// <param name="driverExecutableFileName">The name of the <c>IEDriverServer</c> executable file.</param>
162162
/// <returns>A InternetExplorerDriverService using a random port.</returns>
163-
public static InternetExplorerDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
163+
public static InternetExplorerDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
164164
{
165165
return new InternetExplorerDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
166166
}

dotnet/src/webdriver/Safari/SafariDriverService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static SafariDriverService CreateDefaultService()
103103
/// </summary>
104104
/// <param name="driverPath">The path to the executable or the directory containing the SafariDriver executable.</param>
105105
/// <returns>A SafariDriverService using a random port.</returns>
106-
public static SafariDriverService CreateDefaultService(string driverPath)
106+
public static SafariDriverService CreateDefaultService(string? driverPath)
107107
{
108108
string fileName;
109109
if (File.Exists(driverPath))
@@ -125,7 +125,7 @@ public static SafariDriverService CreateDefaultService(string driverPath)
125125
/// <param name="driverPath">The directory containing the SafariDriver executable.</param>
126126
/// <param name="driverExecutableFileName">The name of the SafariDriver executable file.</param>
127127
/// <returns>A SafariDriverService using a random port.</returns>
128-
public static SafariDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
128+
public static SafariDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)
129129
{
130130
return new SafariDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
131131
}

0 commit comments

Comments
 (0)