lib/druid/elements/text_field.rb in druid-ts-0.0.1 vs lib/druid/elements/text_field.rb in druid-ts-1.1.0
- old
+ new
@@ -1,11 +1,21 @@
module Druid
module Elements
class TextField < Element
def self.finders
- super + [:css, :tag_name, :text]
+ super + [:css, :tag_name, :text, :title]
end
+ #
+ # Set the value of the TextField
+ #
+ def value=(new_value)
+ element.set(new_value)
+ end
end
+
+ Druid::Elements.type_to_class[:text] = Druid::Elements::TextField
+ Druid::Elements.type_to_class[:password] = Druid::Elements::TextField
+
end
end