module Gametel

Constants

VERSION

Public Class Methods

apk_path=(path) click to toggle source
# File lib/gametel.rb, line 20
def self.apk_path=(path)
  @apk_path = path
end
default_driver() click to toggle source
# File lib/gametel.rb, line 28
def self.default_driver
  @default_driver ||= Gametel::Driver.new
end
default_server() click to toggle source
# File lib/gametel.rb, line 32
def self.default_server
  options = [@apk_path]
  options << @keystore if @keystore
  @default_server ||= Brazenhead::Server.new *options
end
included(cls) click to toggle source
# File lib/gametel.rb, line 16
def self.included(cls)
  cls.extend Gametel::Accessors
end
keystore=(keystore) click to toggle source
# File lib/gametel.rb, line 24
def self.keystore=(keystore)
  @keystore = keystore
end
start(activity) click to toggle source
# File lib/gametel.rb, line 38
def self.start(activity)
  default_server.start(activity)
  default_driver
end
stop() click to toggle source
# File lib/gametel.rb, line 43
def self.stop
  default_server.stop
end

Public Instance Methods

back() click to toggle source

Press the back button

# File lib/gametel.rb, line 64
def back
  platform.back
end
back_to(activity) click to toggle source

Go back to a specific activity

# File lib/gametel.rb, line 71
def back_to(activity)
  platform.go_back_to_activity activity
end
current_activity() click to toggle source
# File lib/gametel.rb, line 75
def current_activity
  platform.chain_calls do |device|
    device.get_current_activity
    device.get_class
    device.get_simple_name
  end

  platform.last_response.body.gsub('"','')
end
enabled?(locator) click to toggle source

Returns true if the view is enabled

# File lib/gametel.rb, line 50
def enabled?(locator)
  platform.enabled?(locator)
end
enter() click to toggle source

Press the enter key

# File lib/gametel.rb, line 88
def enter
  platform.enter
end
has_view?(locator) click to toggle source

Returns true if a view exists

# File lib/gametel.rb, line 57
def has_view?(locator)
  platform.has_view?(locator)
end