module Gametel::Webviewable
Constants
- ROBOTIUM_LEFT
- ROBOTIUM_RIGHT
Attributes
platform[R]
Public Class Methods
new(pform = :brazenhead)
click to toggle source
# File lib/gametel/webviewable.rb, line 10 def initialize(pform = :brazenhead) @platform = Gametel::Platforms::BrazenheadPlatform.new if pform == :brazenhead end
Public Instance Methods
click_on_text(text)
click to toggle source
click on the provided text
# File lib/gametel/webviewable.rb, line 17 def click_on_text(text) platform.click_on_text text end
has_text?(text)
click to toggle source
Returns true if the provided text is found on the screen
# File lib/gametel/webviewable.rb, line 25 def has_text?(text) platform.has_text?(text) end
scroll_down()
click to toggle source
scroll down
# File lib/gametel/webviewable.rb, line 41 def scroll_down platform.scroll_down end
scroll_left()
click to toggle source
scroll left
# File lib/gametel/webviewable.rb, line 55 def scroll_left platform.scroll_to_side ROBOTIUM_LEFT end
scroll_right()
click to toggle source
scroll right
# File lib/gametel/webviewable.rb, line 62 def scroll_right platform.scroll_to_side ROBOTIUM_RIGHT end
scroll_up()
click to toggle source
scroll up
# File lib/gametel/webviewable.rb, line 48 def scroll_up platform.scroll_up end
wait_for_text(text_to_find)
click to toggle source
Wait for the provided text to appear
# File lib/gametel/webviewable.rb, line 33 def wait_for_text(text_to_find) platform.wait_for_text(text_to_find) raise "Timed out waiting for the text '#{text_to_find}'" unless platform.last_json end