org.openqa.selenium.firefox
Class FirefoxBinary

java.lang.Object
  extended by org.openqa.selenium.firefox.FirefoxBinary

public class FirefoxBinary
extends java.lang.Object


Constructor Summary
FirefoxBinary()
           
FirefoxBinary(java.io.File pathToFirefoxBinary)
           
 
Method Summary
 void clean(FirefoxProfile profile, java.io.File profileDir)
           
protected  void copeWithTheStrangenessOfTheMac(java.lang.ProcessBuilder builder)
           
 void createProfile(java.lang.String profileName)
           
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(java.lang.ProcessBuilder builder)
           
protected  void startOutputWatcher()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirefoxBinary

public FirefoxBinary()

FirefoxBinary

public FirefoxBinary(java.io.File pathToFirefoxBinary)
Method Detail

isOnLinux

protected boolean isOnLinux()

startProfile

public void startProfile(FirefoxProfile profile,
                         java.io.File profileDir,
                         java.lang.String... commandLineFlags)
                  throws java.io.IOException
Throws:
java.io.IOException

startFirefoxProcess

protected void startFirefoxProcess(java.lang.ProcessBuilder builder)
                            throws java.io.IOException
Throws:
java.io.IOException

startOutputWatcher

protected void startOutputWatcher()

getExecutable

protected Executable getExecutable()

getExtraEnv

public java.util.Map<java.lang.String,java.lang.String> getExtraEnv()

modifyLinkLibraryPath

protected void modifyLinkLibraryPath(java.io.File profileDir)

extractAndCheck

protected java.lang.String extractAndCheck(java.io.File profileDir,
                                           java.lang.String noFocusSoName,
                                           java.lang.String jarPath32Bit,
                                           java.lang.String jarPath64Bit)

copeWithTheStrangenessOfTheMac

protected void copeWithTheStrangenessOfTheMac(java.lang.ProcessBuilder builder)
                                       throws java.io.IOException
Throws:
java.io.IOException

setEnvironmentProperty

public void setEnvironmentProperty(java.lang.String propertyName,
                                   java.lang.String value)

createProfile

public void createProfile(java.lang.String profileName)
                   throws java.io.IOException
Throws:
java.io.IOException

waitFor

public void waitFor()
             throws java.lang.InterruptedException,
                    java.io.IOException
Waits for the process to execute, returning the command output taken from the profile's execution.

Throws:
java.lang.InterruptedException - if we are interrupted while waiting for the process to launch
java.io.IOException - if there is a problem with reading the input stream of the launching process

getConsoleOutput

public java.lang.String getConsoleOutput()
                                  throws java.io.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:
java.io.IOException

clean

public void clean(FirefoxProfile profile,
                  java.io.File profileDir)
           throws java.io.IOException
Throws:
java.io.IOException

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setOutputWatcher

public void setOutputWatcher(java.io.OutputStream stream)

quit

public void quit()


Copyright © 2011. All Rights Reserved.