Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
guacamole
is a wrapper for the SauceLabs browser API.
desiredCapabilities
objects from a browser id, with screen resolution and device orientation support.desiredCapabilities
objects.desiredCapabilities
actually consumes.Install guacamole
:
$ npm install --save guacamole
Fetch a specific browser by id with get()
var guacamole = require("guacamole");
guacamole.initialize()
.then(function () {
// Fetch a specific Firefox by id
console.log(guacamole.get({
id: "firefox_38_OS_X_10_9_Desktop"
}));
// Yields: [{ browserName: 'firefox', version: '38', platform: 'OS X 10.9' }]
// Fetch a specific Firefox by id, with a set screen resolution
console.log(guacamole.get({
id: "firefox_38_OS_X_10_9_Desktop",
screenResolution: "1024x768"
}));
// Yields: { browserName: 'firefox', version: '38', platform: 'OS X 10.9', screenResolution: '1024x768' }
// Fetch a list of available Chrome 43 variants:
guacamole.get({ version: "43" });
// Yields:
/*
[ { browserName: 'chrome',
version: '43',
platform: 'Linux' },
{ browserName: 'chrome',
version: '43',
platform: 'OS X 10.10' },
{ browserName: 'chrome',
version: '43',
platform: 'OS X 10.6' },
{ browserName: 'chrome',
version: '43',
platform: 'OS X 10.8' },
{ browserName: 'chrome',
version: '43',
platform: 'OS X 10.9' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2003' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2008' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2012' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2012 R2' } ]
*/
})
.catch(function (error) {
console.error("Could not load browser details from Sauce API:", error);
});
List all available browsers on the command line with ./node_modules/.bin/guacamole
:
$ ./node_modules/.bin/guacamole
Available Sauce Browsers:
┌────────────────────┬─────────────────────────────────────────┬──────────────────────┬─────────┬────────────────────┬──────────────────────┐
│ Family │ Alias │ Browser │ Version │ OS │ Device │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
│ Chrome │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
│ 1. │ chrome_26_Linux_Desktop │ chrome │ 26 │ Linux │ Desktop │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
│ 2. │ chrome_26_Windows_2003_Desktop │ chrome │ 26 │ Windows 2003 │ Desktop │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
│ 3. │ chrome_26_Windows_2008_Desktop │ chrome │ 26 │ Windows 2008 │ Desktop │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
│ 4. │ chrome_26_Windows_2012_Desktop │ chrome │ 26 │ Windows 2012 │ Desktop │
├────────────────────┼─────────────────────────────────────────┼──────────────────────┼─────────┼────────────────────┼──────────────────────┤
...
Fetch a specific browser from the command line with --id
$ ./node_modules/.bin/guacamole --id=firefox_38_OS_X_10_9_Desktop
{ browserName: 'firefox', version: '38', platform: 'OS X 10.9' }
Amend screenResolution with --screenResolution
. If the API supports that screen resolution, you'll get a result:
$ ./bin/guacamole --id=firefox_38_OS_X_10_9_Desktop --screenResolution=1024x768
{ browserName: 'firefox',
version: '38',
platform: 'OS X 10.9',
screenResolution: '1024x768' }
If you choose a resolution that isn't supported, you'll get an error:
$ ./bin/guacamole --id=firefox_38_OS_X_10_9_Desktop --screenResolution=1024x555
Browsers that match the following specs could not be found: { screenResolution: '1024x555',
id: 'firefox_38_OS_X_10_9_Desktop' }
guacamole
supports filtering by a number of fields (see below for the full list).
For example, filtering by --version=43
displays all available versions of Chrome 43:
$ ./bin/guacamole --version=43
[ { browserName: 'chrome', version: '43', platform: 'Linux' },
{ browserName: 'chrome', version: '43', platform: 'OS X 10.10' },
{ browserName: 'chrome', version: '43', platform: 'OS X 10.6' },
{ browserName: 'chrome', version: '43', platform: 'OS X 10.8' },
{ browserName: 'chrome', version: '43', platform: 'OS X 10.9' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2003' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2008' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2012' },
{ browserName: 'chrome',
version: '43',
platform: 'Windows 2012 R2' } ]
The following list of filter options can be used in the programmatic API or command line interface:
get({
"id": xxxx, // Proprietary to guacamole
"family": xxxx, // Proprietary to guacamole
"browserName": xxxx,
"version": xxxx,
"platform": xxxx,
"deviceName": xxxx,
"platformVersion": xxxx,
"platformName": xxxx,
"screenResolution": xxxx, // if supported by Sauce API
"deviceOrientation": xxxx
})
Command Line Options:
--id=xxxxx (proprietary to guacamole)
--family=xxxxx (proprietary to guacamole)
--browserName=xxxxx
--version=xxxxx
--platform=xxxxx
--deviceName=xxxxx
--platformVersion=xxxxx
--platformName=xxxxx
--screenResolution=xxxxx (if supported)
--deviceOrientation=xxxxx (always used)
All code not otherwise specified is Copyright Wal-Mart Stores, Inc. Released under the MIT License.
FAQs
A friendly wrapper for the SauceLabs browser listing API
The npm package guacamole receives a total of 20 weekly downloads. As such, guacamole popularity was classified as not popular.
We found that guacamole demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.