Skip to content

Instantly share code, notes, and snippets.

@alecxe
Created December 3, 2014 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alecxe/5d6763c1e55a8a4c5747 to your computer and use it in GitHub Desktop.
Save alecxe/5d6763c1e55a8a4c5747 to your computer and use it in GitHub Desktop.
'use strict';
var q = require('q');
var FirefoxProfile = require('firefox-profile');
exports.getFirefoxProfile = function () {
var deferred = q.defer();
var firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("javascript.enabled", false);
firefoxProfile.encoded(function (encodedProfile) {
var capabilities = {
'browserName': 'firefox',
'firefox_profile': encodedProfile,
'specs': [
'*.spec.js'
]
};
deferred.resolve(capabilities);
});
return deferred.promise;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment