Answer the question
In order to leave comments, you need to log in
Nightmare.js how to save the result to a variable?
var Nightmare = require('nightmare');
var nightmare = Nightmare({ show: true });
var fq = [];
nightmare
.goto('---------------')
.evaluate(() => document.querySelector('------------').innerText)
.end()
.then(function(rez){
fq = rez;
})
.catch((error) => {
console.error('Search failed:', error);
});
console.log(fq);
.then(function(rez){
fq = rez;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question