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(); |
I only tested it for now with this UA, without setting the UA it's not working so far ,...
Just made a test with a few other UA, working so far..
Is it use to drag the windows size, I am trying this but it is not working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple question, did you need to set the UA to
Mozilla/5.0 (Macintosh; Intel Mac OS X)
to make it work?