0
@@ -8,22 +8,22 @@ module Webrat
0
find_field_with_id(*args) ||
0
find_field_named(*args) ||
0
field_labeled(*args) ||
0
-
flunk("Could not find field: #{args.inspect}")
0
+
raise(NotFoundError.new("Could not find field: #{args.inspect}"))
0
def field_labeled(label, *field_types)
0
find_field_labeled(label, *field_types) ||
0
-
flunk("Could not find field labeled #{label.inspect}")
0
+
raise(NotFoundError.new("Could not find field labeled #{label.inspect}"))
0
def field_named(name, *field_types)
0
find_field_named(name, *field_types) ||
0
-
flunk("Could not find field named #{name.inspect}")
0
+
raise(NotFoundError.new("Could not find field named #{name.inspect}"))
0
def field_with_id(id, *field_types)
0
find_field_with_id(id, *field_types) ||
0
-
flunk("Could not find field with id #{id.inspect}")
0
+
raise(NotFoundError.new("Could not find field with id #{id.inspect}"))
0
def find_field_labeled(label, *field_types) #:nodoc:
0
@@ -56,7 +56,7 @@ module Webrat
0
return select_option if select_option
0
-
flunk("Could not find option #{option_text.inspect}")
0
+
raise NotFoundError.new("Could not find option #{option_text.inspect}")
0
def find_button(value) #:nodoc:
0
@@ -67,13 +67,13 @@ module Webrat
0
-
flunk("Could not find button #{value.inspect}")
0
+
raise NotFoundError.new("Could not find button #{value.inspect}")
0
def find_area(area_name) #:nodoc:
0
areas.detect { |area| area.matches_text?(area_name) } ||
0
-
flunk("Could not find area with name #{area_name}")
0
+
raise(NotFoundError.new("Could not find area with name #{area_name}"))
0
def find_link(text_or_title_or_id) #:nodoc:
0
@@ -84,7 +84,7 @@ module Webrat
0
matching_links.min { |a, b| a.text.length <=> b.text.length }
0
-
flunk("Could not find link with text or title or id #{text_or_title_or_id.inspect}")
0
+
raise NotFoundError.new("Could not find link with text or title or id #{text_or_title_or_id.inspect}")
0
@@ -93,7 +93,7 @@ module Webrat
0
-
flunk("Could not find the label with text #{label_text}")
0
+
raise NotFoundError.new("Could not find the label with text #{label_text}")