org.openqa.selenium.os
Class CommandLine
java.lang.Object
org.openqa.selenium.os.CommandLine
public class CommandLine
- extends Object
CommandLine
public CommandLine(String executable,
String... args)
CommandLine
public CommandLine(String[] cmdarray)
setEnvironmentVariables
public void setEnvironmentVariables(Map<String,String> environment)
- Adds the specified environment variables.
- Parameters:
environment
- the variables to add
- Throws:
IllegalArgumentException
- if any value given is null (unsupported)
setEnvironmentVariable
public void setEnvironmentVariable(String name,
String value)
- Adds the specified environment variable.
- Parameters:
name
- the name of the environment variablevalue
- the value of the environment variable
- Throws:
IllegalArgumentException
- if the value given is null (unsupported)
setDynamicLibraryPath
public void setDynamicLibraryPath(String newLibraryPath)
getLibraryPathPropertyName
public static String getLibraryPathPropertyName()
- Returns:
- The platform specific env property name which contains the library path.
findExecutable
public static String findExecutable(String named)
- Find the executable by scanning the file system and the PATH. In the case
of Windows this method allows common executable endings (".com", ".bat" and
".exe") to be omitted.
- Parameters:
named
- The name of the executable to find
- Returns:
- The absolute path to the executable, or null if no match is made.
execute
public void execute()
executeAsync
public Process executeAsync()
isSuccessful
public boolean isSuccessful()
getExitCode
public int getExitCode()
getStdOut
public String getStdOut()
destroy
public void destroy()
setInput
public void setInput(String allInput)
toString
public String toString()
- Overrides:
toString
in class Object
copyOutputTo
public void copyOutputTo(OutputStream out)
Copyright © 2011. All Rights Reserved.