Skip to content

Instantly share code, notes, and snippets.

@asciidisco
Created August 6, 2013 10:39
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save asciidisco/6163475 to your computer and use it in GitHub Desktop.
Save asciidisco/6163475 to your computer and use it in GitHub Desktop.
Many screenshots from different pages in different resolutions
module.exports = {
'A lot of screenshots': function (test) {
var resolutions = [{width: 1280, height: 1024}, {width: 1024, height: 768}, {width: 800, height: 600}];
var pages = ['http://facebook.com', 'http://twitter.com', 'http://dalekjs.com'];
resolutions.forEach(function (res) {
pages.forEach(function (page) {
test.open(page)
.resize(res)
.screenshot('pics/' + res.width + '_' + res.height + '_' + page.replace('http://', '') + '.png')
});
});
test.done();
}
}
@iamsebastian
Copy link

Great work, Sebastian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment