Module: Appium::CLI::Config

Defined in:
lib/cli.rb

Class Method Summary collapse

Class Method Details

.default_appium_txt_pathObject


11
12
13
# File 'lib/cli.rb', line 11

def default_appium_txt_path
  'appium.txt'
end

.template(caps) ⇒ Object


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cli.rb', line 15

def template(caps)
  <<-TEMPLATE.gsub(/skip\s/, '')
[caps]
platformName = "#{caps[:platform_name]}"
#{caps[:platform_version] ? "platformVersion = \"#{caps[:platform_version]}\"" : 'skip'}
#{caps[:device_name] ? "deviceName = \"#{caps[:device_name]}\"" : 'skip'}
app = "#{caps[:path_to_app]}"
#{caps[:app_package] ? "appPackage = \"#{caps[:app_package]}\"" : 'skip'}
#{caps[:app_activity] ? "appActivity = \"#{caps[:app_activity]}\"" : 'skip'}

[appium_lib]
server_url = "http://127.0.0.1:4723/wd/hub"
sauce_username = ""
sauce_access_key = ""
  TEMPLATE
end