diff --git a/lib/webrat/core/locators/field_locator.rb b/lib/webrat/core/locators/field_locator.rb index 83ea96b..04da671 100644 --- a/lib/webrat/core/locators/field_locator.rb +++ b/lib/webrat/core/locators/field_locator.rb @@ -21,5 +21,7 @@ module Webrat FieldLocator.new(@session, dom, *args).locate! end + alias_method :find_field, :field + end end \ No newline at end of file diff --git a/lib/webrat/core/methods.rb b/lib/webrat/core/methods.rb index 87729bf..a2c3345 100644 --- a/lib/webrat/core/methods.rb +++ b/lib/webrat/core/methods.rb @@ -43,7 +43,7 @@ module Webrat :clicks_button, :click_button, :reload, :reloads, :clicks_link_within, :click_link_within, - :field_labeled, + :field_labeled, :field_named, :field_by_id, :field, :find_field, :select_option, :set_hidden_field, :submit_form, :request_page, :current_dom, @@ -54,8 +54,5 @@ module Webrat :field_with_id, :selenium, :simulate, :automate - - - end end \ No newline at end of file diff --git a/lib/webrat/core/session.rb b/lib/webrat/core/session.rb index 7bec3df..8bc8f4f 100644 --- a/lib/webrat/core/session.rb +++ b/lib/webrat/core/session.rb @@ -253,6 +253,10 @@ For example: def_delegators :current_scope, :click_link, :clicks_link def_delegators :current_scope, :click_button, :clicks_button def_delegators :current_scope, :field_labeled + def_delegators :current_scope, :field_named + def_delegators :current_scope, :field_by_id + def_delegators :current_scope, :field + def_delegators :current_scope, :find_field def_delegators :current_scope, :field_by_xpath def_delegators :current_scope, :field_with_id def_delegators :current_scope, :select_option