Skip to content

Commit

Permalink
[dotnet] do not set binary as empty string (#12738)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 16, 2023
1 parent 8fee675 commit 9ff1fe2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dotnet/src/webdriver/SeleniumManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,18 @@ public static string DriverPath(DriverOptions options)
}

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

try
{
options.BinaryLocation = browserPath;
options.BinaryLocation = (string)output["browser_path"] == "" ? null : (string)output["browser_path"];
options.BrowserVersion = null;
}
catch (NotImplementedException)
{
// Cannot set Browser Location for this driver and that is ok
}

return driverPath;
return (string)output["driver_path"];
}

/// <summary>
Expand Down

0 comments on commit 9ff1fe2

Please sign in to comment.