org.openqa.selenium.firefox
Class FirefoxBinary
java.lang.Object
org.openqa.selenium.firefox.FirefoxBinary
public class FirefoxBinary
- extends Object
FirefoxBinary
public FirefoxBinary()
FirefoxBinary
public FirefoxBinary(File pathToFirefoxBinary)
setEnvironmentProperty
public void setEnvironmentProperty(String propertyName,
String value)
addCommandLineOptions
public void addCommandLineOptions(String... options)
isOnLinux
protected boolean isOnLinux()
startProfile
public void startProfile(FirefoxProfile profile,
File profileDir,
String... commandLineFlags)
throws IOException
- Throws:
IOException
startFirefoxProcess
protected void startFirefoxProcess(CommandLine command)
throws IOException
- Throws:
IOException
getExecutable
protected Executable getExecutable()
getExtraEnv
public Map<String,String> getExtraEnv()
modifyLinkLibraryPath
protected void modifyLinkLibraryPath(File profileDir)
extractAndCheck
protected String extractAndCheck(File profileDir,
String noFocusSoName,
String jarPath32Bit,
String jarPath64Bit)
createProfile
public void createProfile(String profileName)
throws IOException
- Throws:
IOException
waitFor
public void waitFor()
throws InterruptedException,
IOException
- Waits for the process to execute, returning the command output taken from the profile's
execution.
- Throws:
InterruptedException
- if we are interrupted while waiting for the process to launch
IOException
- if there is a problem with reading the input stream of the launching
process
getConsoleOutput
public String getConsoleOutput()
throws IOException
- Gets all console output of the binary. Output retrieval is non-destructive and non-blocking.
- Returns:
- the console output of the executed binary.
- Throws:
IOException
clean
public void clean(FirefoxProfile profile,
File profileDir)
throws IOException
- Throws:
IOException
getTimeout
public long getTimeout()
setTimeout
public void setTimeout(long timeout)
toString
public String toString()
- Overrides:
toString
in class Object
setOutputWatcher
public void setOutputWatcher(OutputStream stream)
quit
public void quit()
Copyright © 2013. All Rights Reserved.