public class FirefoxBinary extends Object
| 构造器和说明 |
|---|
FirefoxBinary() |
FirefoxBinary(File pathToFirefoxBinary) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCommandLineOptions(String... options) |
String |
getConsoleOutput()
Gets all console output of the binary.
|
Map<String,String> |
getExtraEnv() |
long |
getTimeout() |
void |
quit() |
void |
setEnvironmentProperty(String propertyName,
String value) |
void |
setOutputWatcher(OutputStream stream) |
void |
setTimeout(long timeout) |
void |
startProfile(FirefoxProfile profile,
File profileDir,
String... commandLineFlags) |
String |
toString() |
void |
waitFor()
Waits for the process to execute, returning the command output taken from the profile's
execution.
|
void |
waitFor(long timeout)
Waits for the process to execute, returning the command output taken from the profile's
execution.
|
public FirefoxBinary()
public FirefoxBinary(File pathToFirefoxBinary)
public void addCommandLineOptions(String... options)
public void startProfile(FirefoxProfile profile, File profileDir, String... commandLineFlags) throws IOException
IOExceptionpublic void waitFor()
throws InterruptedException,
IOException
InterruptedException - if we are interrupted while waiting for the process to launchIOException - if there is a problem with reading the input stream of the launching
processpublic void waitFor(long timeout)
throws InterruptedException,
IOException
timeout - the maximum time to wait in millisecondsInterruptedException - if we are interrupted while waiting for the process to launchIOException - if there is a problem with reading the input stream of the launching
processpublic String getConsoleOutput() throws IOException
IOException - IO exception reading from the output stream of the firefox processpublic long getTimeout()
public void setTimeout(long timeout)
public void setOutputWatcher(OutputStream stream)
public void quit()