Skip to content

Instantly share code, notes, and snippets.

@karlbaillie
Created November 14, 2014 16:25
Show Gist options
  • Save karlbaillie/40bdc9f7caaf1aeb58d0 to your computer and use it in GitHub Desktop.
Save karlbaillie/40bdc9f7caaf1aeb58d0 to your computer and use it in GitHub Desktop.
Casper Sample
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