1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Fixed naming

This commit is contained in:
jgagner 2010-01-12 12:27:39 -08:00
parent 28605a5d9c
commit 1e096ddcc0
5 changed files with 7 additions and 3 deletions

View file

@ -103,7 +103,7 @@ class Capybara::Driver::Selenium < Capybara::Driver::Base
def browser def browser
self.class.driver self.class.driver
end end
def with_frame(frame_id) def within_frame(frame_id)
old_window = browser.window_handle old_window = browser.window_handle
browser.switch_to.frame(frame_id) browser.switch_to.frame(frame_id)
yield yield

View file

@ -8,7 +8,7 @@ module Capybara
:all, :attach_file, :body, :check, :choose, :click, :click_button, :click_link, :current_url, :drag, :evaluate_script, :all, :attach_file, :body, :check, :choose, :click, :click_button, :click_link, :current_url, :drag, :evaluate_script,
:field_labeled, :fill_in, :find, :find_button, :find_by_id, :find_field, :find_link, :has_content?, :has_css?, :field_labeled, :fill_in, :find, :find_button, :find_by_id, :find_field, :find_link, :has_content?, :has_css?,
:has_no_content?, :has_no_css?, :has_no_xpath?, :has_xpath?, :locate, :save_and_open_page, :select, :source, :uncheck, :has_no_content?, :has_no_css?, :has_no_xpath?, :has_xpath?, :locate, :save_and_open_page, :select, :source, :uncheck,
:visit, :wait_until, :within, :within_fieldset, :within_table :visit, :wait_until, :within, :within_fieldset, :within_table,:within_frame
] ]
attr_reader :mode, :app attr_reader :mode, :app
@ -33,6 +33,10 @@ module Capybara
end end
end end
def within_frame frame_id
driver.within_frame frame_id
end
def current_url def current_url
driver.current_url driver.current_url
end end

View file

@ -1,7 +1,7 @@
require File.expand_path('spec_helper', File.dirname(__FILE__)) require File.expand_path('spec_helper', File.dirname(__FILE__))
shared_examples_for 'driver with frame support' do shared_examples_for 'driver with frame support' do
it_should_behave_like 'with_frame' it_should_behave_like 'within_frame'
end end
shared_examples_for 'driver' do shared_examples_for 'driver' do