Module: Cukunity::IOS::App
- Extended by:
- Utils, Utils
- Defined in:
- lib/cukunity/drivers/iOS/app.rb
Constant Summary
Constants included
from Utils
Utils::MOBILE_DEVICE_DEFAULT_TIMEOUT
Class Method Summary
collapse
Methods included from Utils
bundle_identifier, device_udid, mobile_device_cmd, uiautomation_cmd, unity_command
Methods included from Utils
check_timeout, merge_options, restrict_options, to_options, wait_connectivity
Class Method Details
.install(path, options = {}) ⇒ Object
7
8
9
10
11
|
# File 'lib/cukunity/drivers/iOS/app.rb', line 7
def self.install(path, options = {})
options = merge_options(options, { :max_time => 30 })
output = mobile_device_cmd(['install_app', path], options).first.chomp
raise Exception::InstallFailed.new unless output == 'OK'
end
|
.installed ⇒ Object
20
21
22
23
24
|
# File 'lib/cukunity/drivers/iOS/app.rb', line 20
def self.installed
mobile_device_cmd(['list_installed_apps']).map do |bundle_id|
bundle_id.chomp
end
end
|
.installed?(path) ⇒ Boolean
26
27
28
29
|
# File 'lib/cukunity/drivers/iOS/app.rb', line 26
def self.installed?(path)
bundle_id = bundle_identifier(path)
installed.include?(bundle_id)
end
|
.uninstall(path, options = {}) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/cukunity/drivers/iOS/app.rb', line 13
def self.uninstall(path, options = {})
options = merge_options(options, { :max_time => 30 })
bundle_id = bundle_identifier(path)
output = mobile_device_cmd(['uninstall_app', bundle_id], options).first.chomp
raise Exception::UninstallFailed.new unless output == 'OK'
end
|