Plantom JS 使用jQuery

var page = require('webpage').create();page.onConsoleMessage=function(msg) { console.log(msg);};page.open('http://www.joox.com', function() {page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { page.evaluate(function() { $("button").click(function() { $("p").hide();}); console.log("Page go"); }); page.render('C:\\Users\\walkeryang\\Desktop\\1.jpeg') phantom.exit() });})


你可能感兴趣的:(SoftwareTesting)