Source Code:
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();
});
I use PhantomJs to load a page, then I get the botton and click, this button jump to a new page, how to get this new page? And how to continue to interact on new page like:
newPage.evaluate(function() {
button.click();
});