Commit f569c296 f569c2966775839bb06c83d4e7c0eec0c0d8a98f by Nicolas Perriault

fixes #639 - withFrame() now switches back to parent frame instead of main one

1 parent 0dcd7fb5
......@@ -2250,12 +2250,12 @@ Casper.prototype.withFrame = function withFrame(frameInfo, then) {
} catch (e) {
// revert to main page on error
this.warn("Error while processing frame step: " + e);
this.page.switchToMainFrame();
this.page.switchToParentFrame();
throw e;
}
return this.then(function _step() {
// revert to main page
this.page.switchToMainFrame();
this.page.switchToParentFrame();
});
};
......