Created
February 21, 2015 21:05
-
-
Save athoune/0088f0ea3356d13c42ef to your computer and use it in GitHub Desktop.
Casper web screenshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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