|
||||||||||
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. |
protected |
FirefoxProfile(Reader defaultsReader,
File profileDir)
|
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 |
areNativeEventsEnabled()
|
void |
clean(File profileDir)
|
protected void |
cleanTemporaryModel()
|
protected void |
copyModel(File sourceDir,
File profileDir)
|
void |
deleteExtensionsCacheIfItExists(File profileDir)
|
protected void |
deleteLockFiles(File profileDir)
|
static FirefoxProfile |
fromJson(String json)
|
protected org.openqa.selenium.firefox.Preferences |
getAdditionalPreferences()
|
protected void |
installExtensions(File parentDir)
|
File |
layoutOnDisk()
Call this to cause the current profile to be written to disk. |
protected Reader |
onlyOverrideThisIfYouKnowWhatYouAreDoing()
Internal method. |
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(org.openqa.selenium.Proxy proxy)
Deprecated. This is now handled by the driver itself. |
boolean |
shouldLoadNoFocusLib()
Returns whether the no focus library should be loaded for Firefox profiles launched on Linux, even if native events are disabled. |
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.@Beta protected FirefoxProfile(Reader defaultsReader, File profileDir)
Method Detail |
---|
@Beta protected Reader onlyOverrideThisIfYouKnowWhatYouAreDoing()
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.@Deprecated public FirefoxProfile setProxyPreferences(org.openqa.selenium.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 areNativeEventsEnabled()
public void setEnableNativeEvents(boolean enableNativeEvents)
public boolean shouldLoadNoFocusLib()
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 void clean(File profileDir)
public String toJson() throws IOException
IOException
public static FirefoxProfile fromJson(String json) throws IOException
IOException
protected void cleanTemporaryModel()
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 |