i have a web app that supports multiple languages, and all i want to do is load the page with a language cookie set and take a screenshot.
var casper = require('casper').create();
var cookieFileName = 'cookies.txt';
// grab cookies from file
var fs = require('fs');
var utils = require('utils');
phantom.cookies = fs.read(cookieFileName);
this.capture('cookietest.png', { top: 0, left:0, width:1000, height: 4000});
});
casper.run();
it doesn't seem to be loading the cookie? is there an easier way to do this? (i COULD just have casper click through the links to actually set the language in the browser, but i would prefer to do it programatically)