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) { ...@@ -2250,12 +2250,12 @@ Casper.prototype.withFrame = function withFrame(frameInfo, then) {
2250 } catch (e) { 2250 } catch (e) {
2251 // revert to main page on error 2251 // revert to main page on error
2252 this.warn("Error while processing frame step: " + e); 2252 this.warn("Error while processing frame step: " + e);
2253 this.page.switchToMainFrame(); 2253 this.page.switchToParentFrame();
2254 throw e; 2254 throw e;
2255 } 2255 }
2256 return this.then(function _step() { 2256 return this.then(function _step() {
2257 // revert to main page 2257 // revert to main page
2258 this.page.switchToMainFrame(); 2258 this.page.switchToParentFrame();
2259 }); 2259 });
2260 }; 2260 };
2261 2261
......