Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@athoune
Created February 21, 2015 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save athoune/0088f0ea3356d13c42ef to your computer and use it in GitHub Desktop.
Save athoune/0088f0ea3356d13c42ef to your computer and use it in GitHub Desktop.
Casper web screenshot
var casper = require("casper").create({
verbose: true,
logLeval: "debug",
timeout: 5000,
onTimeout: function() {
casper.echo("oups Timeout", arguments);
}
});
var args = casper.cli.args;
casper.start().each(args, function(self, arg) {
self.thenOpen('http://' + arg, function() {
this.capture( arg + '.png');
casper.echo(arg);
});
});
casper.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment