Sha256: 7ffc79474481942ee00e5b26a09c0aa9d5717ac3f46cb67eebf4a226c6de4014
Contents?: true
Size: 570 Bytes
Versions: 13
Compression:
Stored size: 570 Bytes
Contents
require "webrat/core/elements/element" module Webrat class Label < Element #:nodoc: attr_reader :element def self.xpath_search ".//label" end def for_id Webrat::XML.attribute(@element, "for") end def field Field.load(@session, field_element) end protected def field_element if for_id.blank? Webrat::XML.xpath_at(@element, *Field.xpath_search_excluding_hidden) else Webrat::XML.css_search(@session.current_dom, "#" + for_id).first end end end end
Version data entries
13 entries across 13 versions & 8 rubygems