Skip to content

Instantly share code, notes, and snippets.

@artjomb
Created October 18, 2014 07:03
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 artjomb/d837bad756bd74735f33 to your computer and use it in GitHub Desktop.
Save artjomb/d837bad756bd74735f33 to your computer and use it in GitHub Desktop.
var casper = require("casper").create({});
casper.on("remote.message", function(msg){
this.echo("remote.msg: " + msg);
});
casper.on("resource.error", function(resourceError){
this.echo("res.err: " + JSON.stringify(resourceError));
});
casper.on("page.error", function(pageErr){
this.echo("page.err: " + JSON.stringify(pageErr));
});
casper.start('https://maizepages.umich.edu/');
casper.then(function() {
this.echo("DONE");
this.capture("screen.png");
});
casper.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment