lib/gametel/accessors.rb in gametel-0.7 vs lib/gametel/accessors.rb in gametel-0.8

- old
+ new

@@ -116,10 +116,13 @@ # def checkbox(name, locator) define_method(name) do platform.click_checkbox(locator) end + define_method("#{name}_checked?") do + Gametel::Views::CheckBox.new(platform, locator).checked? + end define_method("#{name}_view") do Gametel::Views::CheckBox.new(platform, locator) end end @@ -155,10 +158,11 @@ # @param [Symbol] the name used for the generated methods # @param [Hash] locator indicating an id for how the view is found. # The only valid keys are: # * :id # * :text + # * :class (:index => 0 implied) # def view(name, locator) define_method(name) do platform.click_view(locator) end @@ -255,10 +259,12 @@ Gametel::Views::Image.new(platform, locator) end end def webview(name, locator) - + define_method("#{name}_view") do + Gametel::Views::WebView.new(platform, locator) + end end def action_item(name, locator) define_method(name) do platform.click_menu(locator)