Skip to content

Commit

Permalink
Correcting implementation of .NET DriverProcessStarted event
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Jun 4, 2019
1 parent 9f90d99 commit c3f63a9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dotnet/src/webdriver/DriverProcessStartedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ public class DriverProcessStartedEventArgs : EventArgs
public DriverProcessStartedEventArgs(Process driverProcess)
{
this.processId = driverProcess.Id;
this.standardOutputStreamReader = driverProcess.StandardOutput;
this.standardErrorStreamReader = driverProcess.StandardError;
if (driverProcess.StartInfo.RedirectStandardOutput && !driverProcess.StartInfo.UseShellExecute)
{
this.standardOutputStreamReader = driverProcess.StandardOutput;
}

if (driverProcess.StartInfo.RedirectStandardError && !driverProcess.StartInfo.UseShellExecute)
{
this.standardErrorStreamReader = driverProcess.StandardError;
}
}

/// <summary>
Expand Down

0 comments on commit c3f63a9

Please sign in to comment.