
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
grunt-sauce-screenshots
Advanced tools
Takes screenshots of webpages in various browsers using Sauce
Takes screenshots of webpages in various browsers using Sauce
This plugin requires Grunt ~0.4.2
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-sauce-screenshots --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-sauce-screenshots');
In your project's Gruntfile, add a section named sauce_screenshots
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
sauce_screenshots: {
your_target: {
// Target-specific options go here.
},
},
});
This task requires the following environment variables to be set:
$SAUCE_USERNAME
- Sauce account username$SAUCE_ACCESS_KEY
- secret access key for the Sauce accountWithin each per-URL directory, screenshot image files are named according to the browser used:
{{ browserName }}-{{ platform }}-{{ version }}.png
(all screenshots are PNGs)
version
is specified in the Sauce config for the browser, the empty string will be used for the version
portion of the filename.Examples:
chrome-OS_X_10.9-31.png
internet_explorer-Windows_8.1-.png
Type: Array
or String
or function returning Array
Required
An array of Sauce browser specifications. All the URLs will be screenshotted in all of these browsers. If a string is given, it is used as the path to a YAML file containing such an array. If a function is given, it is called (with no arguments) and must return such an array.
Example value:
[
{
"browserName": "chrome",
"platform": "OS X 10.9",
"version": "31"
},
...
]
Relevant Sauce docs: https://saucelabs.com/docs/platforms/webdriver
Type: Object
(key-value mapping) or function returning Object
; keys are String
s representing URLs; values are String
paths to directories
Required
A mapping of webpage URLs (to take screenshots of) to directory paths (to store all the screenshots of the corresponding URL in).
Type: Number
or function returning Number
Optional
Default value: 5 minutes
The maximum allowed duration of the entire screenshotting process, in milliseconds.
If a function is given, it is called with an object having urls
and browsers
as keys, with the values being the length of their respective arrays; it must return a number.
grunt.initConfig({
sauce_screenshots: {
mySites: {
timeout: 60000
browsers: [
{
browserName: "chrome",
platform: "OS X 10.9",
version: "31"
},
{
browserName: "firefox",
platform: "Linux"
}
],
urls: {
'http://www.reddit.com/r/programming/': './screenshots/proggit/',
'http://127.0.0.1:8080/my-demo': './screenshots/my-site/'
}
}
}
});
This Grunt task is being created with the intention of being used by Bootstrap for visual CSS regression testing.
Use the jshint
and jscs
Grunt tasks to check your compliance with the project's coding style. Add unit tests for any new or changed functionality.
FAQs
Takes screenshots of webpages in various browsers using Sauce
We found that grunt-sauce-screenshots demonstrated a not healthy version release cadence and project activity because the last version was released 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.