class Cuesmash::AndroidAppiumText
Creates the appium.txt file that is needed by appium
@author [jarod]
Attributes
appium_app[RW]
appium_avd[RW]
appium_new_command_timeout[RW]
appium_platform_name[RW]
appium_text_for_file[RW]
Public Class Methods
new(platform_name:, avd:, app:, new_command_timeout: 60)
click to toggle source
- initialize description
-
@param platform_name: [type] [description] @param avd: [type] [description] @param app: [type] [description] @param new_command_timeout: 60 [type] [description]
@return [type] [description]
# File lib/cuesmash/android_appium_text.rb, line 25 def initialize(platform_name:, avd:, app:, new_command_timeout: 60) @appium_platform_name = platform_name @appium_avd = avd @appium_app = app @appium_new_command_timeout = new_command_timeout end
Public Instance Methods
execute()
click to toggle source
# File lib/cuesmash/android_appium_text.rb, line 32 def execute started update completed end
Private Instance Methods
completed()
click to toggle source
# File lib/cuesmash/android_appium_text.rb, line 49 def completed Logger.info 'appium.txt updated 👌' end
file_text()
click to toggle source
- caps
-
platformName = “Android” app = “/Users/admin/repos/android-bbd-sample/app/build/outputs/apk/app-debug.apk” newCommandTimeout = “130” avd = “Nexus_6_API_21”
# File lib/cuesmash/android_appium_text.rb, line 58 def file_text text = "[caps]\n" text << "platformName = \"#{appium_platform_name}\"\n" text << "deviceName = \"Android Emulator\"\n" text << "avd = \"#{appium_avd}\"\n" unless appium_avd.nil? text << "app = \"#{appium_app}\"\n" text << "newCommandTimeout = \"#{appium_new_command_timeout}\"\n" Logger.debug "appium.text == #{text}" text end
started()
click to toggle source
# File lib/cuesmash/android_appium_text.rb, line 40 def started Logger.info 'Updating appium.txt' end
update()
click to toggle source
# File lib/cuesmash/android_appium_text.rb, line 44 def update @appium_text_for_file = file_text IO.write('features/support/appium.txt', @appium_text_for_file) end