我有这个错误:
当我尝试执行此代码时:
var phantom = require('phantom');
phantom.create(function(ph) {
return ph.createPage(function(page) {
return page.open("file:///C:/Users/amouna/editor.html", function(status) {
console.log("opened google? ", status);
return page.evaluate((function() {
window.addEventListener('load',Loaded,false);
function Loaded(){
// return document.title;
return document.getElementById('GraphImage');
}
}), function(result) {
console.log('Page title is ' + result);
return ph.exit();
});
});
});
}, {
dnodeOpts: {weak: false}
});