Method: Webrat::Locators::FieldLabeledLocator#matching_label_elements

Defined in:
lib/webrat/core/locators/field_labeled_locator.rb

#matching_label_elementsObject



21
22
23
24
25
# File 'lib/webrat/core/locators/field_labeled_locator.rb', line 21

def matching_label_elements
  label_elements.select do |label_element|
    text(label_element) =~ /^\W*#{Regexp.escape(@value.to_s)}(\b|\Z)/i
  end
end