public class FirefoxBinary extends Object
Constructor and Description |
---|
FirefoxBinary() |
FirefoxBinary(File pathToFirefoxBinary) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandLineOptions(String... options) |
void |
clean(FirefoxProfile profile,
File profileDir) |
void |
createProfile(String profileName) |
protected String |
extractAndCheck(File profileDir,
String noFocusSoName,
String jarPath32Bit,
String jarPath64Bit) |
String |
getConsoleOutput()
Gets all console output of the binary.
|
protected Executable |
getExecutable() |
Map<String,String> |
getExtraEnv() |
long |
getTimeout() |
protected boolean |
isOnLinux() |
protected void |
modifyLinkLibraryPath(File profileDir) |
void |
quit() |
void |
setEnvironmentProperty(String propertyName,
String value) |
void |
setOutputWatcher(OutputStream stream) |
void |
setTimeout(long timeout) |
protected void |
startFirefoxProcess(CommandLine command) |
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)
protected boolean isOnLinux()
public void startProfile(FirefoxProfile profile, File profileDir, String... commandLineFlags) throws IOException
IOException
protected void startFirefoxProcess(CommandLine command) throws IOException
IOException
protected Executable getExecutable()
protected void modifyLinkLibraryPath(File profileDir)
protected String extractAndCheck(File profileDir, String noFocusSoName, String jarPath32Bit, String jarPath64Bit)
public void createProfile(String profileName) throws IOException
IOException
public 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
public void clean(FirefoxProfile profile, File profileDir) throws IOException
IOException
public long getTimeout()
public void setTimeout(long timeout)
public void setOutputWatcher(OutputStream stream)
public void quit()
Copyright © 2014. All rights reserved.