Last active
December 12, 2015 09:29
-
-
Save JohnnyQQQQ/4751813 to your computer and use it in GitHub Desktop.
simple snippet and demo for a drag and drop motion in casperjs
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(); | |
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
Is it use to drag the windows size, I am trying this but it is not working