源代码:
page.open(url, function(status) {
page.evaluate(function() {
//jump to a new page, I want to get and handle this page
$('.imgItem .maskWraper').eq(0).click();
});
console.log(status);
phantom.exit();
});
我使用PhantomJs加载页面,然后我得到了botton并单击,此按钮跳转到新页面,如何获取此新页面?以及如何继续在新页面上进行互动,例如:
newPage.evaluate(function() {
button.click();
});