org.openqa.selenium.firefox
Class FirefoxProfile

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

public class FirefoxProfile
extends java.lang.Object


Constructor Summary
  FirefoxProfile()
           
  FirefoxProfile(java.io.File profileDir)
           
protected FirefoxProfile(ProfileReaper reaper)
           
 
Method Summary
 void addExtension(java.lang.Class<?> loadResourcesUsing, java.lang.String loadFrom)
           
 void addExtension(java.io.File extensionToInstall)
          Attempt to add an extension to install into this instance.
protected  void addWebDriverExtensionIfNeeded(boolean forceCreation)
           
 void clean()
           
 FirefoxProfile createCopy(int port)
           
 void deleteExtensionsCacheIfItExists()
           
protected  org.openqa.selenium.firefox.Preferences getAdditionalPreferences()
           
 java.io.File getExtensionsDir()
           
 int getPort()
           
 java.io.File getProfileDir()
           
protected  java.io.File getUniqueProfileDir()
           
 java.io.File init()
           
protected  void installDevelopmentExtension()
           
 boolean isRunning()
           
 void setPort(int port)
           
 void setPreference(java.lang.String key, boolean value)
          Set a preference for this particular profile.
 void setPreference(java.lang.String key, int value)
          Set a preference for this particular profile.
 void setPreference(java.lang.String key, java.lang.String value)
          Set a preference for this particular profile.
 void updateUserPrefs()
           
protected  void writeNewPrefs(java.util.Map<java.lang.String,java.lang.String> prefs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirefoxProfile

protected FirefoxProfile(ProfileReaper reaper)

FirefoxProfile

public FirefoxProfile(java.io.File profileDir)

FirefoxProfile

public FirefoxProfile()
Method Detail

getUniqueProfileDir

protected java.io.File getUniqueProfileDir()

addWebDriverExtensionIfNeeded

protected void addWebDriverExtensionIfNeeded(boolean forceCreation)
                                      throws java.io.IOException
Throws:
java.io.IOException

addExtension

public void addExtension(java.lang.Class<?> loadResourcesUsing,
                         java.lang.String loadFrom)
                  throws java.io.IOException
Throws:
java.io.IOException

addExtension

public void addExtension(java.io.File extensionToInstall)
                  throws java.io.IOException
Attempt to add an extension to install into this instance.

Parameters:
extensionToInstall -
Throws:
java.io.IOException

installDevelopmentExtension

protected void installDevelopmentExtension()
                                    throws java.io.IOException
Throws:
java.io.IOException

getProfileDir

public java.io.File getProfileDir()

getExtensionsDir

public java.io.File getExtensionsDir()

setPreference

public void setPreference(java.lang.String key,
                          java.lang.String value)
Set a preference for this particular profile. The value will be properly quoted before use. Note that if a value looks as if it is a quoted string (that is, starts with a quote character and ends with one too) an IllegalArgumentException is thrown: Firefox fails to start properly when some values are set to this.

Parameters:
key - The key
value - The new value.

setPreference

public void setPreference(java.lang.String key,
                          boolean value)
Set a preference for this particular profile.

Parameters:
key - The key
value - The new value.

setPreference

public void setPreference(java.lang.String key,
                          int value)
Set a preference for this particular profile.

Parameters:
key - The key
value - The new value.

getAdditionalPreferences

protected org.openqa.selenium.firefox.Preferences getAdditionalPreferences()

updateUserPrefs

public void updateUserPrefs()

deleteExtensionsCacheIfItExists

public void deleteExtensionsCacheIfItExists()

writeNewPrefs

protected void writeNewPrefs(java.util.Map<java.lang.String,java.lang.String> prefs)

getPort

public int getPort()

setPort

public void setPort(int port)

isRunning

public boolean isRunning()

init

public java.io.File init()
                  throws java.io.IOException
Throws:
java.io.IOException

clean

public void clean()

createCopy

public FirefoxProfile createCopy(int port)


Copyright © 2009. All Rights Reserved.