module Platform::Android::Common

Public Instance Methods

back_button() click to toggle source
# File lib/mobmanager/mobile/platform/android/common.rb, line 26
def back_button
  %x[adb shell input keyevent KEYCODE_BACK]
end
prepare_android_phone(settings = nil) click to toggle source
# File lib/mobmanager/mobile/platform/android/common.rb, line 11
def prepare_android_phone(settings = nil)
  if ENV['ANDROID_PHONE'] == 'emulator'
    if ENV['TARGET'] == 'sauce'
      start_emulator(settings)
    else
      terminate_emulator
      start_emulator
      online = wait_for_emulator
      retry_again unless online
    end
  else
    start_android_device
  end
end