public class FirefoxBinary
extends java.lang.Object
Constructor and Description |
---|
FirefoxBinary() |
FirefoxBinary(java.io.File pathToFirefoxBinary) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandLineOptions(java.lang.String... options) |
void |
clean(FirefoxProfile profile,
java.io.File profileDir) |
void |
createProfile(java.lang.String profileName) |
protected java.lang.String |
extractAndCheck(java.io.File profileDir,
java.lang.String noFocusSoName,
java.lang.String jarPath32Bit,
java.lang.String jarPath64Bit) |
java.lang.String |
getConsoleOutput()
Gets all console output of the binary.
|
protected Executable |
getExecutable() |
java.util.Map<java.lang.String,java.lang.String> |
getExtraEnv() |
long |
getTimeout() |
protected boolean |
isOnLinux() |
protected void |
modifyLinkLibraryPath(java.io.File profileDir) |
void |
quit() |
void |
setEnvironmentProperty(java.lang.String propertyName,
java.lang.String value) |
void |
setOutputWatcher(java.io.OutputStream stream) |
void |
setTimeout(long timeout) |
protected void |
startFirefoxProcess(CommandLine command) |
void |
startProfile(FirefoxProfile profile,
java.io.File profileDir,
java.lang.String... commandLineFlags) |
java.lang.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(java.io.File pathToFirefoxBinary)
public void setEnvironmentProperty(java.lang.String propertyName, java.lang.String value)
public void addCommandLineOptions(java.lang.String... options)
protected boolean isOnLinux()
public void startProfile(FirefoxProfile profile, java.io.File profileDir, java.lang.String... commandLineFlags) throws java.io.IOException
java.io.IOException
protected void startFirefoxProcess(CommandLine command) throws java.io.IOException
java.io.IOException
protected Executable getExecutable()
public java.util.Map<java.lang.String,java.lang.String> getExtraEnv()
protected void modifyLinkLibraryPath(java.io.File profileDir)
protected java.lang.String extractAndCheck(java.io.File profileDir, java.lang.String noFocusSoName, java.lang.String jarPath32Bit, java.lang.String jarPath64Bit)
public void createProfile(java.lang.String profileName) throws java.io.IOException
java.io.IOException
public void waitFor() throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
- if we are interrupted while waiting for the process to launchjava.io.IOException
- if there is a problem with reading the input stream of the launching
processpublic void waitFor(long timeout) throws java.lang.InterruptedException, java.io.IOException
timeout
- the maximum time to wait in millisecondsjava.lang.InterruptedException
- if we are interrupted while waiting for the process to launchjava.io.IOException
- if there is a problem with reading the input stream of the launching
processpublic java.lang.String getConsoleOutput() throws java.io.IOException
java.io.IOException
public void clean(FirefoxProfile profile, java.io.File profileDir) throws java.io.IOException
java.io.IOException
public long getTimeout()
public void setTimeout(long timeout)
public java.lang.String toString()
toString
in class java.lang.Object
public void setOutputWatcher(java.io.OutputStream stream)
public void quit()