lib/page-object/elements/element.rb in page-object-0.6.3 vs lib/page-object/elements/element.rb in page-object-0.6.4

- old
+ new

@@ -20,25 +20,25 @@ # # click the element # def click - @element.click + element.click end # # double click the element # def double_click - @element.double_click + element.double_click end # # return true if the element is enabled # def enabled? - @element.enabled? + element.enabled? end # # return true if the element is not enabled # @@ -48,15 +48,15 @@ # # get the value of the given CSS property # def style(property) - @element.style property + element.style property end def inspect - @element.inspect + element.inspect end # @private def self.watir_identifier_for identifier if should_build_watir_xpath(identifier) @@ -103,10 +103,10 @@ end protected def self.should_build_watir_xpath identifier - ['table', 'span', 'div', 'td', 'li', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'].include? identifier[:tag_name] and identifier[:name] + ['table', 'span', 'div', 'td', 'li', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'label'].include? identifier[:tag_name] and identifier[:name] end def self.build_xpath_for identifier tag_locator = identifier.delete(:tag_name) idx = identifier.delete(:index)