Firefox Profile
Source: lib/firefox_profile.js
- FirefoxProfile
- FirefoxProfile.copy
- FirefoxProfile.copyFromUserProfile
- FirefoxProfile.prototype.deleteDir
- FirefoxProfile.prototype._cleanOnExit
- FirefoxProfile.prototype.shouldDeleteOnExit
- FirefoxProfile.prototype.willDeleteOnExit
- FirefoxProfile.prototype.setPreference
- FirefoxProfile.prototype.addExtension
- FirefoxProfile.prototype.addExtensions
- FirefoxProfile.prototype.updatePreferences
- FirefoxProfile.prototype.path
- FirefoxProfile.prototype.canAcceptUntrustedCerts
- FirefoxProfile.prototype.setAcceptUntrustedCerts
- FirefoxProfile.prototype.canAssumeUntrustedCertIssuer
- FirefoxProfile.prototype.setAssumeUntrustedCertIssuer
- FirefoxProfile.prototype.nativeEventsEnabled
- FirefoxProfile.prototype.setNativeEventsEnabled
- FirefoxProfile.prototype.encoded
- FirefoxProfile.prototype.setProxy
Initialize a new instance of a Firefox Profile.
Note that this function uses filesystem sync functions to copy an existing profile (id profileDirectory is provided)
which is not optimized.
If you need optimzed async version, use FirefoxProfile.copy(profileDirectory, cb);
Parameters:
{Object | String | null} options
optional.
If it is an object, it can contain the following option:
- profileDirectory: the profile to copy. Not recommended: use FirefoxProfile.copy instead
- destinationDirectory: where the profile will be stored. If not provided, a tmp directory will be used WARNING: if the tmp directory will be deleted when the process will terminate.
if it is a string it will copy the directory synchronously (not recommended at all, kept for backward compatibility).
Go: TOC
creates a profile Profile from an existing firefox profile directory asynchronously
Parameters:
{Object | String | null} options
if it is an object, the following properties are available:
- profileDirectory - required - the profile to copy.
- destinationDirectory: where the profile will be stored. If not provided, a tmp directory will be used. WARNING: if the tmp directory will be deleted when the process exits.
Go: TOC | FirefoxProfile
copy a profile from the current user profile
Go: TOC | FirefoxProfile
Deletes the profile directory asynchronously.
Call it only if you do not need the profile. Otherwise use at your own risk.
Parameters:
{cb} a
callback function with boolean parameter (false if the dir is not found) that will be called when the profileDir is deleted
Go: TOC | FirefoxProfile.prototype
called on exit to delete the profile directory synchronously.
this function is automatically called by default (= if willDeleteOnExit() returns true) if a tmp directory is used
should not be called directly. process.on('exit') cannot be asynchronous: async code is not called
Go: TOC | FirefoxProfile.prototype
Specify if the profile Directory should be deleted on process.exit()
Note: by default:
- if the constructor is called without param: the new profile directory is deleted
- if the constructor is called with param (path to profile dir): the dir is copied at init and the copy is deleted on exit
Parameters:
{boolean} true
Go: TOC | FirefoxProfile.prototype
returns true if the profile directory will be deleted on process.exit()
Return:
{boolean}
true if (default)
Go: TOC | FirefoxProfile.prototype
Set a user preference.
Any modification to the user preference can be persisted using this.updatePreferences() If this.setPreference() is called before calling this.encoded(), then this.updatePreferences() is automatically called. For a comprehensive list of preference keys, see http://kb.mozillazine.org/About:config_entries
Parameters:
{string} key
- the user preference key{boolean | string} value
See:
Go: TOC | FirefoxProfile.prototype
Add an extension to the profile.
Parameters:
{string} path
- path to a xpi extension file or a unziped extension folder{function} callback
- the callback function to call when the extension is added
Go: TOC | FirefoxProfile.prototype
Add mutliple extensions to the profile.
Parameters:
{Array} extensions
- arrays of paths to xpi extension files or unziped extension folders{function} callback
- the callback function to call when the extension is added
Go: TOC | FirefoxProfile.prototype
Save user preferences to the user.js profile file.
updatePreferences() is automatically called when encoded() is called (if needed = if setPreference() was called before calling encoded())
Go: TOC | FirefoxProfile.prototype
@return {string} path of the profile extension directory
Go: TOC | FirefoxProfile.prototype
@return {boolean} true if webdriver can accept untrusted certificates
Go: TOC | FirefoxProfile.prototype
If not explicitly set, default: true
Parameters:
{boolean} true
to accept untrusted certificates, false otherwise.
Go: TOC | FirefoxProfile.prototype
@return {boolean} true if webdriver can assume untrusted certificate issuer
Go: TOC | FirefoxProfile.prototype
If not explicitly set, default: true
Parameters:
{boolean} true
to make webdriver assume untrusted issuer.
Go: TOC | FirefoxProfile.prototype
@return {boolean} true if native events are enabled
Go: TOC | FirefoxProfile.prototype
If not explicitly set, default: true
Parameters:
{boolean} boolean
true to enable native events.
Go: TOC | FirefoxProfile.prototype
return zipped, base64 encoded string of the profile directory for use with remote WebDriver JSON wire protocol
Parameters:
{Function} function
a callback function with first params as a zipped, base64 encoded string of the profile directory
Go: TOC | FirefoxProfile.prototype
Set network proxy settings.
The parameter proxy
is a hash which structure depends on the value of mandatory proxyType
key,
which takes one of the following string values:
direct
- direct connection (no proxy)system
- use operating system proxy settingspac
- use automatic proxy configuration set based on the value ofautoconfigUrl
keymanual
- manual proxy settings defined separately for different protocols using values from following keys:ftpProxy
,httpProxy
,sslProxy
,socksProxy
Examples:
- set automatic proxy:
profile.setProxy({
proxyType: 'pac',
autoconfigUrl: 'http://myserver/proxy.pac'
});
- set manual http proxy:
profile.setProxy({
proxyType: 'manual',
httpProxy: '127.0.0.1:8080'
});
- set manual http and https proxy:
profile.setProxy({
proxyType: 'manual',
httpProxy: '127.0.0.1:8080',
sslProxy: '127.0.0.1:8080'
});
Parameters:
{Object} proxy
a proxy hash, mandatory keyproxyType
Go: TOC | FirefoxProfile.prototype
—generated by apidox—