Class: Calabash::Extras::AndroidRunner
- Inherits:
-
Object
- Object
- Calabash::Extras::AndroidRunner
- Includes:
- Android::Operations
- Defined in:
- lib/calabash-extras/android_runner.rb
Defined Under Namespace
Classes: Emulator
Instance Attribute Summary collapse
-
#default_device ⇒ Object
readonly
Returns the value of attribute default_device.
Instance Method Summary collapse
-
#initialize(config) ⇒ AndroidRunner
constructor
A new instance of AndroidRunner.
- #reinstall_app ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(config) ⇒ AndroidRunner
Returns a new instance of AndroidRunner.
14 15 16 |
# File 'lib/calabash-extras/android_runner.rb', line 14 def initialize(config) @config = config end |
Instance Attribute Details
#default_device ⇒ Object (readonly)
Returns the value of attribute default_device.
12 13 14 |
# File 'lib/calabash-extras/android_runner.rb', line 12 def default_device @default_device end |
Instance Method Details
#reinstall_app ⇒ Object
29 30 31 32 33 34 |
# File 'lib/calabash-extras/android_runner.rb', line 29 def reinstall_app reinstall_apps sleep 1 start_test_server_in_background reinstall_hook if defined? self.reinstall_hook end |
#start ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/calabash-extras/android_runner.rb', line 18 def start load Gem.bin_path('calabash-android', 'calabash-android') path = File.(@config['apk_path']) Emulator.launch(@config['emulator']) if @config['start_emulator'] build_test_server_if_needed(path) set_default_device(Device.new(self, @config['name'], nil, path, test_server_path(path))) end |