firefox-profile
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -0,1 +1,9 @@ | ||
# 0.2.11 | ||
* catching profileDir delete errors on exit | ||
# 0.2.10 | ||
* made most of the fs calls asynchronous | ||
# 0.2.9 | ||
@@ -2,0 +10,0 @@ |
@@ -7,4 +7,5 @@ Constructor | ||
- <a name="toc_firefoxprofileprofiledirectory"></a>[FirefoxProfile](#firefoxprofileprofiledirectory) | ||
- <a name="toc_firefoxprofilecopyprofiledirectory"></a><a name="toc_firefoxprofile"></a>[FirefoxProfile.copy](#firefoxprofilecopyprofiledirectory) | ||
- <a name="toc_firefoxprofileprototypedeletedir"></a><a name="toc_firefoxprofileprototype"></a>[FirefoxProfile.prototype.deleteDir](#firefoxprofileprototypedeletedir) | ||
- <a name="toc_firefoxprofileprototype_cleanonexit"></a>[FirefoxProfile.prototype._cleanOnExit](#firefoxprofileprototype_cleanonexit) | ||
- <a name="toc_firefoxprofileprototypeshoulddeleteonexittrue"></a>[FirefoxProfile.prototype.shouldDeleteOnExit](#firefoxprofileprototypeshoulddeleteonexittrue) | ||
@@ -26,11 +27,14 @@ - <a name="toc_firefoxprofileprototypewilldeleteonexit"></a>[FirefoxProfile.prototype.willDeleteOnExit](#firefoxprofileprototypewilldeleteonexit) | ||
# FirefoxProfile(profileDirectory) | ||
<a name="firefoxprofile"></a> | ||
> Initialize a new instance of a Firefox Profile | ||
# FirefoxProfile.copy(profileDirectory) | ||
> creates a profile Profile from an existing firefox profile directory | ||
* | ||
**Parameters:** | ||
- `{String | null} profileDirectory` optional. if provided, it will copy the directory | ||
- `{String | null} profileDirectory` optional. if provided, it will copy the directory synchronously | ||
<sub>Go: [TOC](#tableofcontents)</sub> | ||
<sub>Go: [TOC](#tableofcontents) | [FirefoxProfile](#toc_firefoxprofile)</sub> | ||
@@ -41,3 +45,3 @@ <a name="firefoxprofileprototype"></a> | ||
> Deletes the profile directory. | ||
> Deletes the profile directory asynchronously. | ||
@@ -47,4 +51,17 @@ Call it only if you do not need the profile. Otherwise use at your own risk. | ||
@param cb a callback function with boolean parameter (false if the dir is not found) | ||
```js | ||
that will be called when the profileDir is deleted | ||
``` | ||
<sub>Go: [TOC](#tableofcontents) | [FirefoxProfile.prototype](#toc_firefoxprofileprototype)</sub> | ||
# FirefoxProfile.prototype._cleanOnExit() | ||
> called on exit to delete the profile directory synchronously. | ||
should not be called directly. process.on('exit') cannot be asynchronous: async code is not called | ||
<sub>Go: [TOC](#tableofcontents) | [FirefoxProfile.prototype](#toc_firefoxprofileprototype)</sub> | ||
# FirefoxProfile.prototype.shouldDeleteOnExit(true) | ||
@@ -88,4 +105,2 @@ | ||
**See:** | ||
@@ -92,0 +107,0 @@ |
@@ -197,3 +197,7 @@ 'use strict'; | ||
if (fs.existsSync(this.profileDir)) { | ||
wrench.rmdirSyncRecursive(this.profileDir, false); | ||
try { | ||
wrench.rmdirSyncRecursive(this.profileDir, false); | ||
} catch (e) { | ||
console.warn('[firefox-profile] cannot delete profileDir on exit', profileDir, e); | ||
} | ||
} | ||
@@ -200,0 +204,0 @@ }; |
{ | ||
"name": "firefox-profile", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"description": "firefox profile for selenium WebDriverJs, admc/wd or any other node selenium driver that supports capabilities", | ||
@@ -5,0 +5,0 @@ "main": "lib/firefox_profile", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6511390
1086