Skip to content

Instantly share code, notes, and snippets.

@ynonp
Created July 18, 2013 10:43
Show Gist options
  • Save ynonp/6028387 to your computer and use it in GitHub Desktop.
Save ynonp/6028387 to your computer and use it in GitHub Desktop.
casper test poc
casper.options.verbose = true;
casper.options.logLevel = 'error';
casper.options.waitTimeout = 5000;
casper.on('error', function(err) {
this.echo('----> ERROR <----');
});
casper.test.begin('Testing errors', function(test) {
var url = 'http://www.ynonperek.com/static/test.html';
casper.start( url );
casper.then(function() {
var text = this.fetchText('#main');
test.assertEquals( text, 'hello');
});
casper.run();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment