javascript - echo user agent Casperjs -
so i've set new user agent using:
casper.useragent('mozilla/5.0 (macintosh; intel mac os x 10_6_8) applewebkit/537.36(khtml, gecko) chrome/28.0.1500.95 safari/537.36');
but obtain newly modified user agent testing purposes, how 1 print out user agent has been modified using casper.js
?
you try:
casper.on('remote.message', function(msg) { this.echo(msg); }); casper.evaluate(function() { console.log(window.navigator.useragent); });
Comments
Post a Comment