org.openqa.selenium.browserlaunchers
Class AsyncExecute

java.lang.Object
  extended by org.openqa.selenium.browserlaunchers.AsyncExecute

public class AsyncExecute
extends Object

Spawn a process and return the process handle so you can close it yourself later.

Author:
dfabulich

Constructor Summary
AsyncExecute()
           
 
Method Summary
static int killProcess(Process process)
          Forcibly kills a process, using OS tools like "kill" as a last resort
static void sleepTight(long timeout)
          Sleeps without explicitly throwing an InterruptedException
static void sleepTightInSeconds(long timeoutInSeconds)
          Sleeps without explicitly throwing an InterruptedException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncExecute

public AsyncExecute()
Method Detail

sleepTightInSeconds

public static void sleepTightInSeconds(long timeoutInSeconds)
Sleeps without explicitly throwing an InterruptedException

Parameters:
timeoutInSeconds - Sleep time in seconds.
Throws:
RuntimeException - wrapping an InterruptedException if one gets thrown

sleepTight

public static void sleepTight(long timeout)
Sleeps without explicitly throwing an InterruptedException

Parameters:
timeout - the amout of time to sleep
Throws:
RuntimeException - wrapping an InterruptedException if one gets thrown

killProcess

public static int killProcess(Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort

Parameters:
process - The process to kill.
Returns:
The exit value of the process.


Copyright © 2011. All Rights Reserved.