|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.firefox.FirefoxProfile
public class FirefoxProfile
Field Summary | |
---|---|
static String |
PORT_PREFERENCE
|
Constructor Summary | |
---|---|
FirefoxProfile()
|
|
FirefoxProfile(File profileDir)
Constructs a firefox profile from an existing profile directory. |
Method Summary | |
---|---|
void |
addExtension(Class<?> loadResourcesUsing,
String loadFrom)
|
void |
addExtension(File extensionToInstall)
Attempt to add an extension to install into this instance. |
protected void |
addExtension(String key,
Extension extension)
|
protected void |
addWebDriverExtensionIfNeeded()
|
boolean |
alwaysLoadNoFocusLib()
Returns whether the no focus library should be loaded for Firefox profiles launched on Linux, even if native events are disabled. |
void |
clean(File profileDir)
|
protected void |
copyModel(File sourceDir,
File profileDir)
|
void |
deleteExtensionsCacheIfItExists(File profileDir)
|
protected void |
deleteLockFiles(File profileDir)
|
boolean |
enableNativeEvents()
|
static FirefoxProfile |
fromJson(String json)
|
protected org.openqa.selenium.firefox.Preferences |
getAdditionalPreferences()
|
protected void |
installExtensions(File parentDir)
|
boolean |
isRunning(File profileDir)
|
File |
layoutOnDisk()
Call this to cause the current profile to be written to disk. |
void |
setAcceptUntrustedCertificates(boolean acceptUntrustedSsl)
Sets whether Firefox should accept SSL certificates which have expired, signed by an unknown authority or are generally untrusted. |
void |
setAlwaysLoadNoFocusLib(boolean loadNoFocusLib)
Sets whether the no focus library should always be loaded on Linux. |
void |
setAssumeUntrustedCertificateIssuer(boolean untrustedIssuer)
By default, when accepting untrusted SSL certificates, assume that these certificates will come from an untrusted issuer or will be self signed. |
void |
setEnableNativeEvents(boolean enableNativeEvents)
|
void |
setPreference(String key,
boolean value)
Set a preference for this particular profile. |
void |
setPreference(String key,
int value)
Set a preference for this particular profile. |
void |
setPreference(String key,
String value)
Set a preference for this particular profile. |
FirefoxProfile |
setProxyPreferences(Proxy proxy)
Set proxy preferences for this profile. |
String |
toJson()
|
void |
updateUserPrefs(File userPrefs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PORT_PREFERENCE
Constructor Detail |
---|
public FirefoxProfile()
public FirefoxProfile(File profileDir)
Users who need this functionality should consider using a named profile.
profileDir
- The profile directory to use as a model.Method Detail |
---|
protected void addWebDriverExtensionIfNeeded()
public void addExtension(Class<?> loadResourcesUsing, String loadFrom) throws IOException
IOException
public void addExtension(File extensionToInstall) throws IOException
extensionToInstall
-
IOException
protected void addExtension(String key, Extension extension)
public void setPreference(String key, String value)
key
- The keyvalue
- The new value.public void setPreference(String key, boolean value)
key
- The keyvalue
- The new value.public void setPreference(String key, int value)
key
- The keyvalue
- The new value.public FirefoxProfile setProxyPreferences(Proxy proxy)
proxy
- The proxy preferences.
protected org.openqa.selenium.firefox.Preferences getAdditionalPreferences()
public void updateUserPrefs(File userPrefs)
protected void deleteLockFiles(File profileDir)
public void deleteExtensionsCacheIfItExists(File profileDir)
public boolean enableNativeEvents()
public void setEnableNativeEvents(boolean enableNativeEvents)
public boolean alwaysLoadNoFocusLib()
public void setAlwaysLoadNoFocusLib(boolean loadNoFocusLib)
loadNoFocusLib
- Whether to always load the no focus library.public void setAcceptUntrustedCertificates(boolean acceptUntrustedSsl)
acceptUntrustedSsl
- Whether untrusted SSL certificates should be
accepted.public void setAssumeUntrustedCertificateIssuer(boolean untrustedIssuer)
untrustedIssuer
- whether to assume untrusted issuer or not.public boolean isRunning(File profileDir)
public void clean(File profileDir)
public String toJson() throws IOException
IOException
public static FirefoxProfile fromJson(String json) throws IOException
IOException
public File layoutOnDisk()
FirefoxDriver
.
protected void copyModel(File sourceDir, File profileDir) throws IOException
IOException
protected void installExtensions(File parentDir) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |