123456789_123456789_123456789_123456789_123456789_

Module: Capybara::Selenium::Driver::SafariDriver

Relationships & Source Files
Defined in: lib/capybara/selenium/driver_specializations/safari_driver.rb

Instance Method Summary

Instance Method Details

#build_node(native_node, initial_cache = {}) (private)

[ GitHub ]

  
# File 'lib/capybara/selenium/driver_specializations/safari_driver.rb', line 18

def build_node(native_node, initial_cache = {})
  ::Capybara::Selenium::SafariNode.new(self, native_node, initial_cache)
end

#switch_to_frame(frame)

[ GitHub ]

  
# File 'lib/capybara/selenium/driver_specializations/safari_driver.rb', line 6

def switch_to_frame(frame)
  return super unless frame == :parent

  # safaridriver/safari has an issue where switch_to_frame(:parent)
  # behaves like switch_to_frame(:top)
  handles = @frame_handles[current_window_handle]
  browser.switch_to.default_content
  handles.tap(&:pop).each { |fh| browser.switch_to.frame(fh.native) }
end