Created
November 14, 2014 16:25
-
-
Save karlbaillie/40bdc9f7caaf1aeb58d0 to your computer and use it in GitHub Desktop.
Casper Sample
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
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: 'info', | |
pageSettings: { javascriptEnabled: true }, | |
viewportSize: { width: 1600, height: 900 } | |
}); | |
var url = 'http://www.kjbweb.net/', | |
xp = require('casper').selectXPath; | |
casper.start(url); | |
casper.then(function() { | |
// click "Register now" | |
this.click(xp('//*[@id="button"]/a')) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment