def initialize_appium(**args)
      platform = args[:platform]
      caps = args[:caps]

      platform = ENV['platform'] if platform.nil?

      if platform.nil?
        puts 'Platform not found in environment variable'
        exit
      end

      caps = Appium.load_appium_txt file: File.new("#{Dir.pwd}/appium-#{platform}.txt") if caps.nil?

      if caps.nil?
        puts 'No capabilities specified'
        exit
      end
      puts 'Preparing to load capabilities'
      capabilities = load_capabilities(caps)
      puts 'Loaded capabilities'
      @driver = Appium::Driver.new(capabilities, true)
      puts 'Created driver'
      Appium.promote_appium_methods Object
      Appium.promote_appium_methods RSpec::Core::ExampleGroup
      @driver
    end
def initialize_appium(**args)
      platform = args[:platform]
      caps = args[:caps]

      platform = ENV['platform'] if platform.nil?

      if platform.nil?
        puts 'Platform not found in environment variable'
        exit
      end

      caps = Appium.load_appium_txt file: File.new("#{Dir.pwd}/appium-#{platform}.txt") if caps.nil?

      if caps.nil?
        puts 'No capabilities specified'
        exit
      end
      puts 'Preparing to load capabilities'
      capabilities = load_capabilities(caps)
      puts 'Loaded capabilities'
      @driver = Appium::Driver.new(capabilities, true)
      puts 'Created driver'
      Appium.promote_appium_methods Object
      Appium.promote_appium_methods RSpec::Core::ExampleGroup
      @driver
    end
Load appium text file if available and attempt to start the driver
 platform is either android or ios, otherwise read from ENV
 caps is mapping of appium capabilities