Skip to content

Instantly share code, notes, and snippets.

@charlycoste
Created January 31, 2013 17:12
Show Gist options
  • Save charlycoste/4684457 to your computer and use it in GitHub Desktop.
Save charlycoste/4684457 to your computer and use it in GitHub Desktop.
CasperJS script utils
var captureCount = 1;
var startTime = new Date().getTime();
var screenshotPath = 'screenshots';
function screenshot(casper) {
casper.capture(screenshotPath+'/'+startTime+'/'+captureCount+'.png');
captureCount++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment