Commit 59806c3da405708fd385735117a742127fb18b3d
Exists in
master
and in
1 other branch
Merge branch 'master' of git.ucsd.edu:110swag/flashy-frontend
Showing 1 changed file Side-by-side Diff
casper_test.js
View file @
59806c3
1 | +phantom.casperPath = 'path/to/node_modules/casperjs'; | |
2 | +phantom.injectJs('path/to/node_modules/casperjs/bin/bootstrap.js'); | |
3 | + | |
4 | +phantom.casperTest = true; | |
5 | + | |
6 | + | |
7 | +//var casper = require('casper'); | |
8 | +var x = require('casper').selectXPath; | |
9 | + | |
10 | +casper.start('http://google.com/', function() { | |
11 | + this.echo(this.getTitle()); | |
12 | + this.assertExists(x('//*[@id="gbqfbb"]'), 'the element exists'); | |
13 | +}); | |
14 | + | |
15 | +casper.run(); | |
16 | + | |
17 | + |