Module: Gametel::Platforms::Text

Included in:
BrazenheadPlatform
Defined in:
lib/gametel/platforms/brazenhead/text.rb

Instance Method Summary collapse

Instance Method Details

#clear_text_by_id(id) ⇒ Object



33
34
35
36
37
# File 'lib/gametel/platforms/brazenhead/text.rb', line 33

def clear_text_by_id(id)
  get_view_by_id(id) do |device|
    device.clear_edit_text('@@the_view@@', :target => 'Robotium')
  end
end

#enter_text_by_id(id, text) ⇒ Object



21
22
23
24
25
# File 'lib/gametel/platforms/brazenhead/text.rb', line 21

def enter_text_by_id(id, text)
  get_view_by_id(id) do |device|
    device.enter_text '@@the_view@@', text, :target => 'Robotium'
  end
end

#enter_text_by_index(index, text) ⇒ Object



27
28
29
30
31
# File 'lib/gametel/platforms/brazenhead/text.rb', line 27

def enter_text_by_index(index, text)
  chain_calls do |device|
    device.enter_text(index, text)
  end
end

#get_text_by_id(id) ⇒ Object



7
8
9
10
11
12
# File 'lib/gametel/platforms/brazenhead/text.rb', line 7

def get_text_by_id(id)
  get_view_by_id(id) do |device|
    device.get_text
    device.to_string
  end
end

#get_text_by_index(index) ⇒ Object



14
15
16
17
18
19
# File 'lib/gametel/platforms/brazenhead/text.rb', line 14

def get_text_by_index(index)
  get_view_by_index('android.widget.EditText', index) do |device|
    device.get_text
    device.to_string
  end
end

#get_text_description_by_id(id) ⇒ Object



45
46
47
48
49
# File 'lib/gametel/platforms/brazenhead/text.rb', line 45

def get_text_description_by_id(id)
  get_view_by_id(id) do |device|
    device.get_content_description
  end
end

#get_text_hint_by_id(id) ⇒ Object



39
40
41
42
43
# File 'lib/gametel/platforms/brazenhead/text.rb', line 39

def get_text_hint_by_id(id)
  get_view_by_id(id) do |device|
    device.get_hint
  end
end