lib/celerity/extra/method_generator.rb in jarib-celerity-0.0.5.5 vs lib/celerity/extra/method_generator.rb in jarib-celerity-0.0.5.6
- old
+ new
@@ -14,11 +14,19 @@
downcase
end
end
module Celerity
+
+ #
# Experimental - generate a method definition for accessing elements on the current page.
+ #
+ # Usage:
+ #
+ # MethodGenerator.new(browser, opts).parse
+ #
+ #
class MethodGenerator
ELEMENTS = %w[text_field select_list radio checkbox button].map { |e| e.to_sym }
BUGGY_ELEMENTS = %w[radio checkbox].map { |e| e.to_sym }
@@ -133,16 +141,20 @@
end
end # MethodGenerator
class Browser
+
+ #
# Experimental - generate a method definition for accessing elements on the current page
# Not loaded by default - need to require 'celerity/extra/method_generator'
+ #
+
def generate_method(opts = {})
MethodGenerator.new(self, opts).parse
end
+
end # Browser
-
end # Celerity
# if __FILE__ == $0