Class: Webrat::Locators::FieldLocator

Inherits:
Locator show all
Defined in:
lib/webrat/core/locators/field_locator.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Locator

#initialize, #locate!

Constructor Details

This class inherits a constructor from Webrat::Locators::Locator

Instance Method Details

#error_messageObject



14
15
16
# File 'lib/webrat/core/locators/field_locator.rb', line 14

def error_message
  "Could not find field: #{@value.inspect}"
end

#locateObject



8
9
10
11
12
# File 'lib/webrat/core/locators/field_locator.rb', line 8

def locate
  FieldByIdLocator.new(@session, @dom, @value).locate   ||
  FieldNamedLocator.new(@session, @dom, @value, *@field_types).locate   ||
  FieldLabeledLocator.new(@session, @dom, @value, *@field_types).locate
end