casperjs
Version:
A navigation scripting & testing utility for PhantomJS and SlimerJS
10 lines (9 loc) • 389 B
JavaScript
/*eslint strict:0*/
casper.test.begin('exists() tests', 2, function(test) {
casper.start('tests/site/index.html', function() {
test.assert(this.exists('a'), 'Casper.exists() can check if an element exists');
test.assertNot(this.exists('chucknorriz'), 'Casper.exists() can check than an element does not exist');
}).run(function() {
test.done();
});
});