Skip to content

Instantly share code, notes, and snippets.

@tdm00
Created June 12, 2014 04:17
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 tdm00/7cf52fff3987b02c0264 to your computer and use it in GitHub Desktop.
Save tdm00/7cf52fff3987b02c0264 to your computer and use it in GitHub Desktop.
CasperJS sample test file
var url = 'http://www.msu.edu';
casper.test.begin('Lookup homepage', 1, function suite(test) {
casper.start(url, function() {
test.assertHttpStatus(200, "Web server returned page correctly");
test.assertTitle('Michigan State University');
});
casper.run(function() {
test.done();
});
});
@gkini
Copy link

gkini commented Jul 8, 2014

Thanks Troy. This example just saved me a head ache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment