Module: Appium::Core::Base::Device::AppManagement
- Includes:
- _Bridge
- Included in:
- Bridge
- Defined in:
- lib/appium_lib_core/common/device/app_management.rb,
sig/lib/appium_lib_core/common/device/app_management.rbs
Instance Method Summary
collapse
Methods included from _Bridge
#bridge, #execute, #execute_async_script, #execute_script
Instance Method Details
#activate_app(app_id) ⇒ Object
53
54
55
56
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 53
def activate_app(app_id)
execute :activate_app, {}, bundleId: app_id
end
|
#app_installed?(app_id) ⇒ Boolean
48
49
50
51
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 48
def app_installed?(app_id)
execute :app_installed?, {}, bundleId: app_id
end
|
#app_strings(language = nil) ⇒ Object
20
21
22
23
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 20
def app_strings(language = nil)
opts = language ? { language: language } : {} execute_script 'mobile:getAppStrings', opts
end
|
#background_app(duration = 0) ⇒ Object
25
26
27
28
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 25
def background_app(duration = 0)
raise NotImplementedError
end
|
#install_app(path, options = {}) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 30
def install_app(path, options = {}) args = { appPath: path }
args[:options] = options unless options && options.empty?
execute :install_app, {}, args
end
|
#options?(*args) ⇒ Boolean
71
72
73
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 71
def options?(*args)
args.compact.any?
end
|
#remove_app(id, keep_data: nil, timeout: nil) ⇒ Object
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 37
def remove_app(id, keep_data: nil, timeout: nil)
args = { appId: id }
args[:options] = {} unless keep_data.nil? && timeout.nil?
args[:options][:keepData] = keep_data unless keep_data.nil?
args[:options][:timeout] = timeout unless timeout.nil?
execute :remove_app, {}, args
end
|
#terminate_app(app_id, timeout: nil) ⇒ Object
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/appium_lib_core/common/device/app_management.rb', line 58
def terminate_app(app_id, timeout: nil)
args = { appId: app_id }
args[:options] = {} unless timeout.nil?
args[:options][:timeout] = timeout unless timeout.nil?
execute :terminate_app, {}, args
end
|