Class selenium-webdriver/firefox/profile.Profile

code »

Models a Firefox proifle directory for use with the FirefoxDriver. The Proifle directory uses an in-memory model until #writeToDisk is called.

Constructor

Profile ( opt_dir )
Parameters
opt_dir: string=
Path to an existing Firefox profile directory to use a template for this profile. If not specified, a blank profile will be used.
Show:

Instance Methods

Returns
Whether the FirefoxDriver is configured to automatically accept untrusted SSL certificates.
code »addExtension ( extension )

Registers an extension to be included with this profile.

Parameters
extension: string
Path to the extension to include, as either an unpacked extension directory or the path to a xpi file.
Returns
Whether to assume untrusted certs come from untrusted issuers.
code »encode ( )!promise.Promise.<string>

Encodes this profile as a zipped, base64 encoded directory.

Returns
A promise for the encoded profile.
Returns
The port this profile is currently configured to use, or 0 if the port will be selected at random when the profile is written to disk.

Returns the currently configured value of a profile preference. This does not include any defaults defined in the profile's template directory user.js file (if a template were specified on construction).

Parameters
key: string
The desired preference.
Returns
The current value of the requested preference.

Returns whether native events are enabled in this profile.

Returns
.

Sets whether the FirefoxDriver should automatically accept untrusted SSL certificates.

Parameters
value: boolean
.

Sets whether to assume untrusted certificates come from untrusted issuers.

Parameters
value: boolean
.

Sets whether to use native events with this profile.

Parameters
enabled: boolean
.

Sets the port to use for the WebDriver extension loaded by this profile.

Parameters
port: number
The desired port, or 0 to use any free port.
code »setPreference ( key, value )

Sets a desired preference for this profile.

Parameters
key: string
The preference key.
value: (string|number|boolean)
The preference value.
Throws
Error
If attempting to set a frozen preference.
code »writeToDisk ( opt_excludeWebDriverExt )!promise.Promise.<string>

Writes this profile to disk.

Parameters
opt_excludeWebDriverExt: boolean=
Whether to exclude the WebDriver extension from the generated profile. Used to reduce the size of an encoded profile since the server will always install the extension itself.
Returns
A promise for the path to the new profile directory.

Instance Properties