lib/watir-webdriver/elements/input.rb in watir-webdriver-0.0.1.dev4 vs lib/watir-webdriver/elements/input.rb in watir-webdriver-0.0.1.dev5
- old
+ new
@@ -6,9 +6,16 @@
def enabled?
!disabled?
end
+ #
+ # Return the type attribute of the element, or 'text' if the attribute is invalid.
+ # TODO: discuss.
+ #
+ # @return [String]
+ #
+
def type
assert_exists
value = rescue_no_match { @element.attribute("type").to_s }
# we return 'text' if the type is invalid