Class: Appium::CLI::Setup

Inherits:
Thor
  • Object
show all
Defined in:
lib/cli.rb

Instance Method Summary collapse

Instance Method Details

#androidObject


49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/cli.rb', line 49

def android
  toml = File.join(Dir.pwd, Config.default_appium_txt_path)
  template = Config.template(
    automation_name: 'uiautomator2',
    platform_name: 'Android',
    device_name: 'Pixel 3',
    path_to_app: '/path/to/apk',
    app_package: 'com.package.example',
    app_activity: 'com.package.example.ExampleActivity'
  )
  File.write(toml, template)
end

#iosObject


36
37
38
39
40
41
42
43
44
45
46
# File 'lib/cli.rb', line 36

def ios
  toml = File.join(Dir.pwd, Config.default_appium_txt_path)
  template = Config.template(
    automation_name: 'XCUITest',
    platform_name: 'iOS',
    device_name: 'iPhone Simulator',
    platform_version: '12.0',
    path_to_app: '/path/to/app_bundle'
  )
  File.write(toml, template)
end