Class ExternalProcess

java.lang.Object
org.openqa.selenium.os.ExternalProcess

public class ExternalProcess extends Object
  • Constructor Details

  • Method Details

    • builder

      public static ExternalProcess.Builder builder()
    • getOutput

      public String getOutput()
      The last N bytes of the combined stdout and stderr as String, the value of N is set while building the OsProcess.
      Returns:
      stdout and stderr as String in Charset.defaultCharset() encoding
    • isAlive

      public boolean isAlive()
    • waitFor

      public boolean waitFor(Duration duration) throws InterruptedException
      Throws:
      InterruptedException
    • exitValue

      public int exitValue()
    • shutdown

      public void shutdown()
      Initiate a normal shutdown of the process or kills it when the process is alive after 4 seconds.
    • shutdown

      public void shutdown(Duration timeout)
      Initiate a normal shutdown of the process or kills it when the process is alive after the given timeout.
      Parameters:
      timeout - the duration for a process to terminate before destroying it forcibly.