node-phantom
node-phantom copied to clipboard
Add support for userAgent
https://github.com/ariya/phantomjs/blob/master/examples/useragent.js
Vote up! For now one could use this hack:
function setUserAgent(page, ua) {
page.setFn('EVIL_EVAL', 'page.settings.userAgent = "' + ua + '"');
}
I think API should be more broad to support setting of nested page properties like
page.set('settings.userAgent', ua);
but not only userAgent or any of page.settings