Method: Calabash::Android::Operations::Device#initialize

Defined in:
lib/calabash-android/operations.rb

#initialize(cucumber_world, serial, server_port, app_path, test_server_path, test_server_port = 7102) ⇒ Device

Returns a new instance of Device.


278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/calabash-android/operations.rb', line 278

def initialize(cucumber_world, serial, server_port, app_path, test_server_path, test_server_port = 7102)

  @cucumber_world = cucumber_world
  @serial = serial || default_serial
  @server_port = server_port || default_server_port
  @app_path = app_path
  @test_server_path = test_server_path
  @test_server_port = test_server_port

  forward_cmd = "#{adb_command} forward tcp:#{@server_port} tcp:#{@test_server_port}"
  log forward_cmd
  log `#{forward_cmd}`
end