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)
isOnLinux
protected boolean isOnLinux()
startProfile
public void startProfile(FirefoxProfile profile,
File profileDir,
String... commandLineFlags)
throws IOException
- Throws:
IOException
startFirefoxProcess
protected void startFirefoxProcess(ProcessBuilder builder)
throws IOException
- Throws:
IOException
startOutputWatcher
protected void startOutputWatcher()
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)
copeWithTheStrangenessOfTheMac
protected void copeWithTheStrangenessOfTheMac(ProcessBuilder builder)
throws IOException
- Throws:
IOException
setEnvironmentProperty
public void setEnvironmentProperty(String propertyName,
String value)
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 © 2011. All Rights Reserved.