diff options
Diffstat (limited to 'node_modules/selenium-webdriver/firefox/profile.js')
-rw-r--r-- | node_modules/selenium-webdriver/firefox/profile.js | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/node_modules/selenium-webdriver/firefox/profile.js b/node_modules/selenium-webdriver/firefox/profile.js index b6b39086c..b7f6363f9 100644 --- a/node_modules/selenium-webdriver/firefox/profile.js +++ b/node_modules/selenium-webdriver/firefox/profile.js @@ -201,9 +201,6 @@ class Profile { /** @private {!Object} */ this.preferences_ = {}; - Object.assign(this.preferences_, getDefaultPreferences()['mutable']); - Object.assign(this.preferences_, getDefaultPreferences()['frozen']); - /** @private {boolean} */ this.nativeEventsEnabled_ = true; @@ -218,6 +215,14 @@ class Profile { } /** + * @return {(string|undefined)} Path to an existing Firefox profile directory + * to use as a template when writing this Profile to disk. + */ + getTemplateDir() { + return this.template_; + } + + /** * Registers an extension to be included with this profile. * @param {string} extension Path to the extension to include, as either an * unpacked extension directory or the path to a xpi file. @@ -227,6 +232,13 @@ class Profile { } /** + * @return {!Array<string>} A list of extensions to install in this profile. + */ + getExtensions() { + return this.extensions_; + } + + /** * Sets a desired preference for this profile. * @param {string} key The preference key. * @param {(string|number|boolean)} value The preference value. @@ -255,6 +267,13 @@ class Profile { } /** + * @return {!Object} A copy of all currently configured preferences. + */ + getPreferences() { + return Object.assign({}, this.preferences_); + } + + /** * Specifies which host the driver should listen for commands on. If not * specified, the driver will default to "localhost". This option should be * specified when "localhost" is not mapped to the loopback address @@ -353,6 +372,8 @@ class Profile { // Freeze preferences for async operations. var prefs = {}; + Object.assign(prefs, getDefaultPreferences()['mutable']); + Object.assign(prefs, getDefaultPreferences()['frozen']); Object.assign(prefs, this.preferences_); // Freeze extensions for async operations. |