Skip to content

Instantly share code, notes, and snippets.

@younes0x53
Created November 21, 2015 18:02
Show Gist options
  • Select an option

  • Save younes0x53/6b45598cdb0bb6e540b2 to your computer and use it in GitHub Desktop.

Select an option

Save younes0x53/6b45598cdb0bb6e540b2 to your computer and use it in GitHub Desktop.
Sent tweet with casperJS
var casper = require("casper").create({
verbose: true,
});
casper.start("http://twitter.com/intent/tweet", function() {
casper.evaluate( function() {
document.querySelector('#status').value = ' *Insert tweet here* ';
document.querySelector('#username_or_email').value = ' *Insert username here* ';
document.querySelector('#password').value = ' *Insert password here* ';
document.querySelector('.button').click();
});
});
casper.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment