Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

commented Sep 19, 2013

Great work, Sebastian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.