Created
July 18, 2013 10:43
-
-
Save ynonp/6028387 to your computer and use it in GitHub Desktop.
casper test poc
This file contains hidden or 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
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