var slimer = require('node-slimerJs');
slimer.create(function(err,sl) {
return sl.createPage(function(err,page) {
console.log(err);
page.settings.userAgent = 'TEST USER AGENT STRING';
console.log("Using UA " + page.settings.userAgent);
});
});
With erroring result:
Macintosh:test user$ node slimer_node_test.js
Slimer spawned with web server on port: 56995
Page created with id: 1
null
Slimer spawn err: TypeError: Cannot set property 'userAgent' of undefined
I am trying to access the "settings" property on the page object, but it is undefined. http://docs.slimerjs.org/current/api/webpage.html#webpage-settings
With erroring result: