Module: Gametel::Platforms::Webview

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

Instance Method Summary collapse

Instance Method Details

#clear_text_in_webview(how, what) ⇒ Object



19
20
21
22
23
# File 'lib/gametel/platforms/brazenhead/webview.rb', line 19

def clear_text_in_webview(how, what)
  find_web_element_by(how, what) do |device, by|
    device.clear_text_in_web_element(by, :target => :Robotium)
  end
end

#click_on_webview(how, what, index = 0, scroll = true) ⇒ Object



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

def click_on_webview(how, what, index=0, scroll=true)
  find_web_element_by(how, what) do |device, by|
    device.click_on_web_element(by, index, scroll, :target => :Robotium)
  end
end

#enter_text_in_webview(how, what, text) ⇒ Object



13
14
15
16
17
# File 'lib/gametel/platforms/brazenhead/webview.rb', line 13

def enter_text_in_webview(how, what, text)
  find_web_element_by(how, what) do |device, by|
    device.enter_text_in_web_element(by, text, :target => :Robotium)
  end
end

#find_web_element_by(how, what) ⇒ Object



25
26
27
28
29
30
# File 'lib/gametel/platforms/brazenhead/webview.rb', line 25

def find_web_element_by(how, what)
  chain_calls do |device|
    device.web_view_by(how, what, :variable => '@@by@@', :target => :Brazenhead)
    yield device, '@@by@@'
  end
end