Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
firefox-profile
Advanced tools
firefox profile for selenium WebDriverJs, admc/wd or any other node selenium driver that supports capabilities
Firefox Profile for Selenium WebdriverJS, admc/wd or any other library that allows you to set capabilities.
This class allows you to:
More info on user preferences here.
"real" npm support is on its way... soon... maybe... Open an issue if you need it... Use npm:
npm install firefox-profile
Make sur you have selenium server running... or use 'selenium-webdriver/remote' class.
/******************************************************************
* with selenium webdriverJs
* installs firebug
* and make http://saadtazi.com the url that is opened on new tabs
/******************************************************************
var webdriver = require('selenium-webdriver');
// create profile
var FirefoxProfile = require('firefox-profile');
var myProfile = new FirefoxProfile();
// you can add an extension by specifying the path to the xpi file
// or to the unzipped extension directory
myProfile.addExtension('test/extensions/firebug-1.12.4-fx.xpi', function() {
var capabilities = webdriver.Capabilities.firefox();
// you can set firefox preferences BEFORE calling encoded()
myProfile.setPreference('browser.newtab.url', 'http://saadtazi.com');
// attach your newly created profile
myProfile.encoded(function(encodedProfile) {
capabilities.set('firefox_profile', encodedProfile);
// start the browser
var wd = new webdriver.Builder().
withCapabilities(capabilities).
build();
// woot!
wd.get('http://en.wikipedia.org');
});
});
/**************************************************
/* with admc/wd
/* installs firebug, and make it active by default
/**************************************************
var FirefoxProfile = require('firefox-profile'),
wd = require('wd');
// 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');
// you can install multiple extensions at the same time
fp.addExtensions(['./test/extensions/firebug-1.12.4-fx.xpi'], function() {
fp.encoded(function(zippedProfile) {
browser = wd.promiseChainRemote();
browser.init({
browserName:'firefox',
// set firefox_profile capabilities HERE!!!!
firefox_profile: zippedProfile
}).
// woOot!!
get('http://en.wikipedia.org');
});
});
The API documentation can be found in doc/.
It can be regenerated using grunt docs
.
Requires apidox - listed in devDependencies.
mocha
# or
grunt mochacov:unit
grunt mochacov:coverage
Generates doc/coverage.html
This class is actually a port of the python class.
Open a github issue.
0.2.9
FAQs
firefox profile for selenium WebDriverJs, admc/wd or any other node selenium driver that supports capabilities
The npm package firefox-profile receives a total of 88,737 weekly downloads. As such, firefox-profile popularity was classified as popular.
We found that firefox-profile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.