Module: Capybara::Apparition::Browser::Frame

Included in:
Capybara::Apparition::Browser
Defined in:
lib/capybara/apparition/browser/frame.rb

Instance Method Summary collapse

Instance Method Details

#switch_to_frame(frame) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/capybara/apparition/browser/frame.rb', line 6

def switch_to_frame(frame)
  case frame
  when Capybara::Node::Base
    current_page.push_frame(frame)
  when :parent
    current_page.pop_frame
  when :top
    current_page.pop_frame(top: true)
  end
end