Skip to content

Commit d83c0ef

Browse files
committed
[dotnet] tidy Selenium manager logic
1 parent 722813c commit d83c0ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dotnet/src/webdriver/SeleniumManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ private static string RunCommand(string fileName, string arguments)
126126
process.StartInfo.UseShellExecute = false;
127127
process.StartInfo.RedirectStandardOutput = true;
128128

129+
string output;
129130
try
130131
{
131132
process.Start();
133+
output = process.StandardOutput.ReadToEnd();
132134
}
133135
catch (Exception ex)
134136
{
135-
throw new WebDriverException("Error starting process: " + process, ex);
137+
throw new WebDriverException($"Error starting process: {fileName} {arguments}", ex);
136138
}
137139

138-
String output = process.StandardOutput.ReadToEnd();
139-
140140
if (!output.StartsWith("INFO")) {
141-
throw new WebDriverException("Invalid response from process: " + process);
141+
throw new WebDriverException($"Invalid response from process: {fileName} {arguments}");
142142
}
143143

144144
return output;

0 commit comments

Comments
 (0)