public class FirefoxBinary
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Executable |
executable |
private java.util.Map<java.lang.String,java.lang.String> |
extraEnv |
private java.util.List<java.lang.String> |
extraOptions |
private static java.lang.String |
IME_IBUS_HANDLER_LIBRARY_NAME |
private static java.lang.String |
NO_FOCUS_LIBRARY_NAME |
private static java.lang.String |
PATH_PREFIX |
private org.openqa.selenium.os.CommandLine |
process |
private java.io.OutputStream |
stream |
private long |
timeout |
Constructor and Description |
---|
FirefoxBinary() |
FirefoxBinary(java.io.File pathToFirefoxBinary) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandLineOptions(java.lang.String... options) |
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(org.openqa.selenium.os.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.
|
private static final java.lang.String NO_FOCUS_LIBRARY_NAME
private static final java.lang.String IME_IBUS_HANDLER_LIBRARY_NAME
private static final java.lang.String PATH_PREFIX
private final java.util.Map<java.lang.String,java.lang.String> extraEnv
private final java.util.List<java.lang.String> extraOptions
private final Executable executable
private org.openqa.selenium.os.CommandLine process
private java.io.OutputStream stream
private long timeout
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(org.openqa.selenium.os.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 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
- IO exception reading from the output stream of the firefox processpublic 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()