Class: Webrat::Locators::ElementLocator

Inherits:
Locator
  • Object
show all
Defined in:
lib/cucumber/webrat/element_locator.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#error_messageObject



67
68
69
# File 'lib/cucumber/webrat/element_locator.rb', line 67

def error_message
  "Could not find anything matching '#{@value}'"
end

#locateObject



59
60
61
# File 'lib/cucumber/webrat/element_locator.rb', line 59

def locate
  Element.load(@session, table_element)
end

#table_elementObject



63
64
65
# File 'lib/cucumber/webrat/element_locator.rb', line 63

def table_element
  Webrat::XML.css_search(@dom, @value)[0]
end