mirror of
https://github.com/teampoltergeist/poltergeist.git
synced 2022-11-09 12:05:00 -05:00
parent
a94e40945d
commit
c2660fd3f0
4 changed files with 15 additions and 4 deletions
|
@ -301,6 +301,8 @@ Include as much information as possible. For example:
|
|||
|
||||
* Fix timing issue when using `within_frame` that could cause errors.
|
||||
[Issue #183, #211] (@errm, @motemen)
|
||||
* Fix bug with `within_frame` not properly switching the context back
|
||||
after the block has executed. [Issue #242]
|
||||
|
||||
### 1.0.2 ###
|
||||
|
||||
|
|
|
@ -202,8 +202,12 @@ Poltergeist.WebPage = (function() {
|
|||
};
|
||||
|
||||
WebPage.prototype.pushFrame = function(name) {
|
||||
this.frames.push(name);
|
||||
return this["native"].switchToFrame(name);
|
||||
if (this["native"].switchToFrame(name)) {
|
||||
this.frames.push(name);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
WebPage.prototype.popFrame = function() {
|
||||
|
|
|
@ -138,8 +138,11 @@ class Poltergeist.WebPage
|
|||
@native.customHeaders = headers
|
||||
|
||||
pushFrame: (name) ->
|
||||
@frames.push(name)
|
||||
@native.switchToFrame(name)
|
||||
if @native.switchToFrame(name)
|
||||
@frames.push(name)
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
popFrame: ->
|
||||
@frames.pop()
|
||||
|
|
|
@ -350,6 +350,8 @@ describe Capybara::Session do
|
|||
@session.current_path.should == "/poltergeist/slow"
|
||||
@session.html.should include('slow page')
|
||||
end
|
||||
|
||||
@session.current_path.should == '/'
|
||||
end
|
||||
|
||||
it 'waits for the cross-domain frame to load' do
|
||||
|
|
Loading…
Add table
Reference in a new issue