Sha256: 3cf09588fca327558c2159bf914bc45035dc7aa2123cc8ae8dfb89221345e21f

Contents?: true

Size: 756 Bytes

Versions: 13

Compression:

Stored size: 756 Bytes

Contents

module Gametel
  module Views
    class Progress < View

      PROGRESS_BAR_CLASS = 'android.widget.ProgressBar'

      protected

      def build_property_methods
        metaclass = class << self; self; end
        properties.each do |property|
          metaclass.send(:define_method, "#{property}?".to_sym) do
            
            platform.get_view_by_id(locator[:id]) do |device|
              device.send "is_#{property}"
            end if locator[:id]
            
            platform.get_view_by_index(PROGRESS_BAR_CLASS, locator[:index]) do |device|
              device.send "is_#{property}"
            end if locator[:index]

            platform.last_response.body == "true"
          end
        end
      end

      
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gametel-0.7 lib/gametel/views/progress.rb
gametel-0.6 lib/gametel/views/progress.rb
gametel-0.5.9.3 lib/gametel/views/progress.rb
gametel-0.5.9.2 lib/gametel/views/progress.rb
gametel-0.5.9.1 lib/gametel/views/progress.rb
gametel-0.5.9 lib/gametel/views/progress.rb
gametel-0.5.8.1 lib/gametel/views/progress.rb
gametel-0.5.8 lib/gametel/views/progress.rb
gametel-0.5.7 lib/gametel/views/progress.rb
gametel-0.5.6 lib/gametel/views/progress.rb
gametel-0.5.5 lib/gametel/views/progress.rb
gametel-0.5.4 lib/gametel/views/progress.rb
gametel-0.5.3 lib/gametel/views/progress.rb