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');
    });
});

猜你喜欢

转载自834945712.iteye.com/blog/2268893
今日推荐