Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
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 () {
var desiredCapabilities = guacamole.get({
id: "firefox_38_OS_X_10_9_Desktop"
});
// Yields: { browserName: 'firefox', version: '38', platform: 'OS X 10.9' }
console.log(desiredCapabilities);
var desiredCapabilities = guacamole.get({
id: "firefox_38_OS_X_10_9_Desktop",
screenResolution: "1024x768"
});
// Yields: { browserName: 'firefox', version: '38', platform: 'OS X 10.9', screenResolution: '1024x768' }
console.log(desiredCapabilities);
})
.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 64 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.