Module: Gametel::Platforms::View
- Included in:
- BrazenheadPlatform
- Defined in:
- lib/gametel/platforms/brazenhead/view.rb
Instance Method Summary collapse
- #click_on_view_by_class(clazz, index) ⇒ Object
- #click_on_view_by_id(id) ⇒ Object
- #get_view_by_id(id, &block) ⇒ Object
- #get_view_by_index(clazz, index, &block) ⇒ Object
Instance Method Details
#click_on_view_by_class(clazz, index) ⇒ Object
13 14 15 16 17 |
# File 'lib/gametel/platforms/brazenhead/view.rb', line 13 def click_on_view_by_class(clazz, index) get_view_by_index(clazz, index) do |device| device.click_on_view('@@the_view@@', :target => 'Robotium') end end |
#click_on_view_by_id(id) ⇒ Object
7 8 9 10 11 |
# File 'lib/gametel/platforms/brazenhead/view.rb', line 7 def click_on_view_by_id(id) get_view_by_id(id) do |device| device.click_on_view('@@the_view@@', :target => 'Robotium') end end |
#get_view_by_id(id, &block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/gametel/platforms/brazenhead/view.rb', line 19 def get_view_by_id(id, &block) chain_calls do |device| device.id_from_name(id, :target => 'Brazenhead', :variable => '@@view_id@@') device.get_view('@@view_id@@', :target => 'Robotium', :variable => '@@the_view@@') block.call device if block end end |
#get_view_by_index(clazz, index, &block) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gametel/platforms/brazenhead/view.rb', line 27 def get_view_by_index(clazz, index, &block) chain_calls do |device| device.get_class device.get_class_loader :variable => '@@loader@@' device.get_class device.for_name clazz, false, '@@loader@@', :variable => '@@the_type@@' device.get_view '@@the_type@@', index || 0, :target => 'Robotium', :variable => '@@the_view@@' block.call device if block end end |