Module: Appium::Core::Base::Device::AppState
- Included in:
- Bridge::MJSONWP, Bridge::W3C
- Defined in:
- lib/appium_lib_core/common/device/app_state.rb
Constant Summary collapse
- STATUS =
[ :not_installed, # 0 :not_running, # 1 :running_in_background_suspended, # 2 :running_in_background, # 3 :running_in_foreground # 4 ].freeze
Instance Method Summary collapse
Instance Method Details
#app_state(app_id) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/appium_lib_core/common/device/app_state.rb', line 14 def app_state(app_id) # required: [['appId'], ['bundleId']] response = execute :app_state, {}, appId: app_id case response when 0, 1, 2, 3, 4 STATUS[response] else ::Appium::Logger.debug("Unexpected status in app_state: #{response}") response end end |