mercredi 7 janvier 2015

Zombie.js options not permitted any more?

I am making a simple testing script using Node.js and Zombie.js for a website of mine. I wanted to make it so that the 'visits' are comming from chrome:



var UA = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"

setInterval(function () {
browser.visit('/', {userAgent: UA}, function(err) {
assert.ifError(err);
});
}, 1000);


This seems to work but the problem is that for every request made I get this error in the console:



visit with options is deprecated and will be removed soon


Now, is there a more 'correct' way to do this with Zombie.js? Or, is there another option for me to use (like Phantomjs perjhaps)?


Any ideas?


Aucun commentaire:

Enregistrer un commentaire