Skip to content

Instantly share code, notes, and snippets.

@rgomezcasas
Created March 31, 2015 14:49
Show Gist options
  • Save rgomezcasas/20ec896320873a503fd1 to your computer and use it in GitHub Desktop.
Save rgomezcasas/20ec896320873a503fd1 to your computer and use it in GitHub Desktop.
Casper Helpers
casper.on("page.error", function(msg, trace) {
this.echo("Error: " + msg, "ERROR");
this.echo("file: " + trace[0].file, "WARNING");
this.echo("line: " + trace[0].line, "WARNING");
this.echo("function: " + trace[0]["function"], "WARNING");
});
casper.on('remote.message', function(message) {
this.echo('Remote: ' + message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment