Skip to content

Instantly share code, notes, and snippets.

@baniol
Forked from JohnnyQQQQ/draganddrop.js
Created May 15, 2013 06:08
Show Gist options
  • Save baniol/5581936 to your computer and use it in GitHub Desktop.
Save baniol/5581936 to your computer and use it in GitHub Desktop.
var casper = require('casper').create();
casper.start();
casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X)');
casper.viewport(1024, 768);
casper.thenOpen('http://jsbin.com/ifuma#noedit', function() {
this.capture('test.png');
this.mouse.down(10, 10);
this.mouse.move(200, 200);
this.mouse.up(200, 200);
this.capture('test1.png');
});
casper.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment