fixes #639 - withFrame() now switches back to parent frame instead of main one
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment