I'm just trying to do this as an exercise to learn casperjs, I'm not trying to cross any ethical borders. Anyway, here is my code:
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
casper.start('http://twitter.com/signup', function() {
this.sendKeys('#full-name', username);
this.sendKeys('#email', email);
this.sendKeys('#password', password);
this.click('#submit_button');
});
casper.then(function() {
this.evaluateOrDie(function() {
return /message sent/.test(document.body.innerText);
}, 'sending message failed');
});
casper.run(function() {
this.echo('message sent').exit();
});
I'm not very sure why this doesn't work. This is the error I get:
Any help would be appreciated.