Skip to content

Commit 9ff1fe2

Browse files
committed
[dotnet] do not set binary as empty string (#12738)
1 parent 8fee675 commit 9ff1fe2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dotnet/src/webdriver/SeleniumManager.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,18 @@ public static string DriverPath(DriverOptions options)
104104
}
105105

106106
Dictionary<string, object> output = RunCommand(BinaryFullPath, argsBuilder.ToString());
107-
string browserPath = (string)output["browser_path"];
108-
string driverPath = (string)output["driver_path"];
109107

110108
try
111109
{
112-
options.BinaryLocation = browserPath;
110+
options.BinaryLocation = (string)output["browser_path"] == "" ? null : (string)output["browser_path"];
113111
options.BrowserVersion = null;
114112
}
115113
catch (NotImplementedException)
116114
{
117115
// Cannot set Browser Location for this driver and that is ok
118116
}
119117

120-
return driverPath;
118+
return (string)output["driver_path"];
121119
}
122120

123121
/// <summary>

0 commit comments

Comments
 (0)