var phantom = require('phantom');
phantom.create()
.then(function (ph) {
_ph = ph;
return ph.createPage();
})
.then(function(page) {
_page = page;
url = "http://www.aeiou.pt";
return page.open(url);
})
.then(function(page) {
console.log("hello3");
page.evaluate(function () {
My code starts with something like this. The console.log "hello3" is printed but then, it gives me error:
TypeError: page.evaluate is not a function at /home/someone/server123.js:58:11 at at process._tickCallback (internal/process/next_tick.js:188:7)
Why it happens in this situation?
Node version: v8.6.0
Npm version: 5.3.0
Phantom version: phantom@4.0.5