Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
grunt-sauce-screenshots
Advanced tools
Readme
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
The npm package grunt-sauce-screenshots receives a total of 1 weekly downloads. As such, grunt-sauce-screenshots popularity was classified as not popular.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.