Class: Webrat::Link
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Element
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Element
#initialize, #inspect, load, load_all, #path
Constructor Details
This class inherits a constructor from Webrat::Element
Class Method Details
.xpath_search ⇒ Object
9 10 11 |
# File 'lib/webrat/core/elements/link.rb', line 9 def self.xpath_search [".//a[@href]"] end |
Instance Method Details
#click(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/webrat/core/elements/link.rb', line 13 def click( = {}) method = [:method] || http_method return if href =~ /^#/ && method == :get [:javascript] = true if [:javascript].nil? if [:javascript] @session.request_page(absolute_href, method, data) else @session.request_page(absolute_href, :get, {}) end end |