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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -