Socket
Socket
Sign inDemoInstall

firefox-profile

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firefox-profile - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.4.5
* fix ctl-c exit
# 0.4.4

@@ -2,0 +6,0 @@

7

lib/firefox_profile.js

@@ -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",

@@ -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);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc