Class: Webrat::Label

Inherits:
Element show all
Defined in:
lib/webrat/core/elements/label.rb

Overview

:nodoc:

Instance Attribute Summary collapse

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

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



6
7
8
# File 'lib/webrat/core/elements/label.rb', line 6

def element
  @element
end

Class Method Details

.xpath_searchObject



8
9
10
# File 'lib/webrat/core/elements/label.rb', line 8

def self.xpath_search
  [".//label"]
end

Instance Method Details

#fieldObject



16
17
18
# File 'lib/webrat/core/elements/label.rb', line 16

def field
  Field.load(@session, field_element)
end

#for_idObject



12
13
14
# File 'lib/webrat/core/elements/label.rb', line 12

def for_id
  @element["for"]
end