public class FirefoxBinary
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FirefoxBinary.Channel
Enumerates Firefox channels, according to https://wiki.mozilla.org/RapidRelease
|
Constructor and Description |
---|
FirefoxBinary() |
FirefoxBinary(java.io.File pathToFirefoxBinary) |
FirefoxBinary(FirefoxBinary.Channel channel) |
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.
|
java.util.Map<java.lang.String,java.lang.String> |
getExtraEnv() |
protected java.io.File |
getFile() |
protected java.lang.String |
getPath() |
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.
|
public FirefoxBinary()
public FirefoxBinary(FirefoxBinary.Channel channel)
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 java.io.File getFile()
protected java.lang.String getPath()
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()