casper js导致cpu使用率过高

阅读更多

 

casper.waitForPopup(/popup\.html$/, function() {
    this.test.assertEquals(this.popups.length, 1);
});

casper.withPopup(/popup\.html$/, function() {
    this.test.assertTitle('Popup title');
});

改成

casper.waitForPopup(/popup\.html$/, function() {
    this.test.assertEquals(this.popups.length, 1);
    casper.withPopup(/popup\.html$/, function() {
        this.test.assertTitle('Popup title');
    });
});

你可能感兴趣的:(casper,crawl)