Class: Calabash::Extras::ApplicationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/calabash-extras/application_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ApplicationHandler

Returns a new instance of ApplicationHandler.



5
6
7
8
9
# File 'lib/calabash-extras/application_handler.rb', line 5

def initialize(config)
  @conf = config
  ENV['SCREENSHOT_PATH'] = @conf['screen_shot_dir']
  start_device unless defined? @@device
end

Instance Method Details

#deviceObject



19
20
21
# File 'lib/calabash-extras/application_handler.rb', line 19

def device
  @@device
end

#page(clz, *args) ⇒ Object



11
12
13
# File 'lib/calabash-extras/application_handler.rb', line 11

def page (clz, *args)
  @@device.page(clz, *args)
end

#reinstallObject



15
16
17
# File 'lib/calabash-extras/application_handler.rb', line 15

def reinstall
  @@device.reinstall_app
end