> var page = require('webpage').create();
> var url = '
http://localhost:8000';
> page.open(url, function (status) {
> localStorage.clear();
> phantom.exit();
> });
You are in Phantom context there, but I think you need to be in browser
context instead. Does the following code work?
var page = require('webpage').create();
var url = '
http://localhost:8000';
page.open(url, function (status) {
page.evaluate(function(){
localStorage.clear();
});
phantom.exit();
});
Darren