Skip to content

Instantly share code, notes, and snippets.

@iwek
Created July 17, 2012 14:31
Show Gist options
  • Save iwek/3129738 to your computer and use it in GitHub Desktop.
Save iwek/3129738 to your computer and use it in GitHub Desktop.
view and disable cookies in casperjs and phantomjs
//to disable cookies, run casperjs --cookies-file=/dev/null? cookies.js
var casper = require('casper').create();
casper.start('http://wordpress.org/', function() {
this.echo('Browser Cookie: ' + this.evaluate(function() {
return document.cookie;
}));
});
casper.run(function() {
this.echo('Done.').exit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment