Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Work with Capybaras new driver frame api #796

Merged
merged 1 commit into from Jul 19, 2016

Conversation

twalpole
Copy link
Contributor

Update poltergeist to support the new driver frame api

@@ -804,7 +804,9 @@

expect {
@session.within_frame('omg') { }
}.to raise_error(Capybara::Poltergeist::FrameNotFound)
}.to raise_error { |e|
expect(e).to be_a(Capybara::Poltergeist::FrameNotFound).or be_a(Capybara::ElementNotFound)
Copy link
Contributor

@simi simi Jul 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why or? Depends on phantomjs version?

Copy link
Contributor Author

@twalpole twalpole Jul 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because from 2.8 on Capybara handles finding the frame element and just passes it to the driver. That means it will return with ElementNotFound before the driver is even called if the frame doesn't exist. When Poltergeist is used with Capybara < 2.8 the old behavior will still continue

@twalpole twalpole merged commit cca1000 into teampoltergeist:master Jul 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants