lib/extensions/watir.rb in bret-watircraft-0.4.1 vs lib/extensions/watir.rb in bret-watircraft-0.4.2
- old
+ new
@@ -1,9 +1,11 @@
# TODO: support radiogroup
# TODO: migrate this code into Watir
-# TODO: also handle FireWatir classes
-module Watir
+
+def Watir.add_display_value_methods_to mod
+ mod.module_eval <<-CLASS_END
+
class TextField # includes Hidden
def display_value
value
end
end
@@ -32,10 +34,17 @@
class Element
def display_value
text
end
end
+ class NonControlElement
+ def display_value
+ text
+ end
+ end
class B < NonControlElement
TAG = 'B'
end
+
+ CLASS_END
end
\ No newline at end of file