Skip to content

Instantly share code, notes, and snippets.

@potch
Created December 17, 2013 01:45
Show Gist options
  • Save potch/7998535 to your computer and use it in GitHub Desktop.
Save potch/7998535 to your computer and use it in GitHub Desktop.
screenshot capture script
SLIMERJSLAUNCHER=/Applications/Firefox.app/Contents/MacOS/firefox casperjs test --engine=slimerjs screenshottest.js
casper.start('https://facebook.com/', function() {
casper.viewport(1024,768);
this.wait(5000);
});
casper.then(function() {
this.capture('output.png');
});
casper.run();

excerpt from our travis script

echo 'Installing Slimer'
wget http://download.slimerjs.org/v0.8/0.8.5/slimerjs-0.8.5.zip -O slimerjs.zip
unzip slimerjs.zip -d slimer-temp
mv slimer-temp/slimer* slimerjs/
rm -r slimer-temp

echo 'Installing Casper'
git clone git://github.com/n1k0/casperjs.git
cd casperjs
git checkout 1.1-beta3
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment