module Gametel::Platforms::Progress

Constants

PROGRESS_BAR_CLASS

Public Instance Methods

get_progress(locator) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 9
def get_progress(locator)
  return get_progress_by_id locator[:id] if locator[:id]
  return get_progress_by_index locator[:index] if locator[:index]
end
get_progress_max(locator) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 29
def get_progress_max(locator)
  return get_progress_max_by_id locator[:id] if locator[:id]
  return get_progress_max_by_index locator[:index] if locator[:index]
end
get_secondary_progress(locator) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 19
def get_secondary_progress(locator)
  return get_secondary_progress_by_id locator[:id] if locator[:id]
  return get_secondary_progress_by_index locator[:index] if locator[:index]
end
set_progress(locator, value) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 14
def set_progress(locator, value)
  set_progress_by_id locator[:id], value if locator[:id]
  set_progress_by_index locator[:index], value if locator[:index]
end
set_secondary_progress(locator, value) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 24
def set_secondary_progress(locator, value)
  set_secondary_progress_by_id locator[:id], value if locator[:id]
  set_secondary_progress_by_index locator[:index], value if locator[:index]
end

Private Instance Methods

get_progress_by_id(id) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 35
def get_progress_by_id(id)
  get_view_by_id(id) do |device|
    device.get_progress
  end
  last_response.body.to_i
end
get_progress_by_index(index) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 42
def get_progress_by_index(index)
  get_view_by_index(PROGRESS_BAR_CLASS, index) do |device|
    device.get_progress
  end
  last_response.body.to_i
end
get_progress_max_by_id(id) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 87
def get_progress_max_by_id(id)
  get_view_by_id(id) do |device|
    device.get_max
  end
  last_response.body.to_i
end
get_progress_max_by_index(index) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 94
def get_progress_max_by_index(index)
  get_view_by_index(PROGRESS_BAR_CLASS, index) do |device|
    device.get_max
  end
  last_response.body.to_i
end
get_secondary_progress_by_id(id) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 61
def get_secondary_progress_by_id(id)
  get_view_by_id(id) do |device|
    device.get_secondary_progress
  end
  last_response.body.to_i
end
get_secondary_progress_by_index(index) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 68
def get_secondary_progress_by_index(index)
  get_view_by_index(PROGRESS_BAR_CLASS, index) do |device|
    device.get_secondary_progress
  end
  last_response.body.to_i
end
set_progress_by_id(id, progress) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 49
def set_progress_by_id(id, progress)
  get_view_by_id(id) do |device|
    device.set_progress_bar '@@the_view@@', progress, :target => 'Robotium'
  end
end
set_progress_by_index(index, progress) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 55
def set_progress_by_index(index, progress)
  get_view_by_index(PROGRESS_BAR_CLASS, index) do |device|
    device.set_progress_bar '@@the_view@@', progress, :target => 'Robotium'
  end
end
set_secondary_progress_by_id(id, progress) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 75
def set_secondary_progress_by_id(id, progress)
  get_view_by_id(id) do |device|
    device.set_secondary_progress progress
  end
end
set_secondary_progress_by_index(index, progress) click to toggle source
# File lib/gametel/platforms/brazenhead/progress.rb, line 81
def set_secondary_progress_by_index(index, progress)
  get_view_by_index(PROGRESS_BAR_CLASS, index) do |device|
    device.set_secondary_progress progress
  end
end