Sha256: 13e587dcab525384a93fb98aa8cf2f07d937c2ceff13cab995514b9a8044367a
Contents?: true
Size: 565 Bytes
Versions: 21
Compression:
Stored size: 565 Bytes
Contents
// Read the Phantom webpage '#intro' element text using jQuery and "includeJs" var page = require('webpage').create(); page.onConsoleMessage = function(msg) { console.log(msg); }; page.open("http://www.phantomjs.org", function(status) { if ( status === "success" ) { page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { page.evaluate(function() { console.log("$(\"#intro\").text() -> " + $("#intro").text()); }); phantom.exit(); }); } });
Version data entries
21 entries across 19 versions & 3 rubygems