lib/capybara/poltergeist/browser.rb in poltergeist-1.10.0 vs lib/capybara/poltergeist/browser.rb in poltergeist-1.11.0
- old
+ new
@@ -138,9 +138,20 @@
yield
ensure
command 'pop_frame'
end
+ def switch_to_frame(handle, &block)
+ case handle
+ when Capybara::Node::Base
+ command 'push_frame', [handle.native.page_id, handle.native.id]
+ when :parent
+ command 'pop_frame'
+ when :top
+ command 'pop_frame', true
+ end
+ end
+
def window_handle
command 'window_handle'
end
def window_handles