Created
May 17, 2014 15:10
-
-
Save mickaelandrieu/e8f9d170c0a7e08f08f8 to your computer and use it in GitHub Desktop.
How to capture multiples images with the same class with CasperJS ?
This file contains 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 clipRects = this.getElementsBounds('.list_item img.poster'); | |
var i = 0; | |
clipRects.forEach(function(clipRect) { | |
casper.capture(i+'.png', clipRect); | |
i++; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment