firefox-profile
Advanced tools
Comparing version 0.4.4 to 0.4.5
@@ -0,1 +1,5 @@ | ||
# 0.4.5 | ||
* fix ctl-c exit | ||
# 0.4.4 | ||
@@ -2,0 +6,0 @@ |
@@ -139,9 +139,10 @@ /** | ||
var self = this; | ||
this.onExit = function() { | ||
this.onExit = function(evt) { | ||
if (self._deleteOnExit) { | ||
self._cleanOnExit(); | ||
} | ||
process.exit(evt === 'SIGINT' ? 130 : 0); | ||
}; | ||
['exit', 'SIGINT'].forEach(function(event) { | ||
process.addListener(event, self.onExit); | ||
process.addListener(event, self.onExit.bind(self, event)); | ||
}); | ||
@@ -158,5 +159,3 @@ } | ||
FirefoxProfile.prototype._copy = function(profileDirectory, cb) { | ||
var self = this; | ||
fs.copy(profileDirectory, this.profileDir, { | ||
@@ -163,0 +162,0 @@ clobber: true, |
{ | ||
"name": "firefox-profile", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"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", |
38
test.js
@@ -1,35 +0,7 @@ | ||
var FirefoxProfile = require('./lib/firefox_profile'), | ||
wd = require('wd'); | ||
const FP = require('./lib/firefox_profile'); | ||
// set some userPrefs if needed | ||
// Note: make sure you call encoded() after setting some userPrefs | ||
var fp = new FirefoxProfile(); | ||
// activate and open firebug by default for all sites | ||
fp.setPreference('extensions.firebug.allPagesActivation', 'on'); | ||
// activate the console panel | ||
fp.setPreference('extensions.firebug.console.enableSites', true); | ||
// show the console panel | ||
fp.setPreference('extensions.firebug.defaultPanelName', 'console'); | ||
fp.setPreference('some.custom.pref', 'con\sole'); | ||
fp.setPreference('some.custom.otherpref', 'con\\sole'); | ||
// done with prefs? | ||
fp.updatePreferences(); | ||
const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); | ||
// you can install multiple extensions at the same time | ||
// fp.addExtensions(['./test/extensions/firebug-1.12.4-fx.xpi'], function() { | ||
fp.encoded(function(zippedProfile) { | ||
console.log(zippedProfile); | ||
browser = wd.promiseChainRemote(); | ||
browser.init({ | ||
browserName:'firefox', | ||
// set firefox_profile capabilities HERE!!!! | ||
firefox_profile: zippedProfile | ||
}). | ||
// woOot!! | ||
get('https://en.wikipedia.org/wiki/Main_Page').then(function () { | ||
return new Promise(function(resolve) { | ||
setTimeout(function () { resolve(); }, 1000000); | ||
}); | ||
}).done(); | ||
}); | ||
// }); | ||
const fp = new FP(); | ||
wait(10000); |
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
43536
932