Commit 652f26c3 652f26c3f87569aa694f183e36876854acf4ca15 by Nicolas Perriault

added tests for Casper#exists

1 parent 4f157b94
...@@ -33,6 +33,7 @@ casper.options.verbose = true; ...@@ -33,6 +33,7 @@ casper.options.verbose = true;
33 // Casper#start() 33 // Casper#start()
34 casper.test.comment('navigating'); 34 casper.test.comment('navigating');
35 casper.start('tests/site/index.html', function(self) { 35 casper.start('tests/site/index.html', function(self) {
36 self.test.assert(self.exists('a') && !self.exists('chucknorriz'), 'exists() can check if an element exists');
36 self.test.assertTitle('CasperJS test index', 'start() casper can start itself an open an url'); 37 self.test.assertTitle('CasperJS test index', 'start() casper can start itself an open an url');
37 self.test.assertEval(function() { 38 self.test.assertEval(function() {
38 return typeof(__utils__) === "object"; 39 return typeof(__utils__) === "object";
......