Skip to content

Instantly share code, notes, and snippets.

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