I'm using Selenium with Java for some tests. The code I have to print the pages html from javascript works great as an alert:
js.executeScript("alert($('html').html());");
However when I use return, nothing prints in the Eclipse console:
js.executeScript("return $('html').html();");
What am I doing wrong, and how can i print (using System.out.print) the html result from returning in Javascript? Thanks, and no I do not want to use source.
js.executeScriptinvocation and print the value? (ie,System.out.println(js.executeScript(..)))System.out.printlninvocation).