def load_capabilities(caps)
      device = @server.device_data
      unless device.nil?
        caps[:caps][:udid] = device.fetch('udid', nil)
        caps[:caps][:platformVersion] = device.fetch('os', caps[:caps][:platformVersion])
        caps[:caps][:deviceName] = device.fetch('name', caps[:caps][:deviceName])
        caps[:caps][:wdaLocalPort] = device.fetch('wdaPort', nil)
        caps[:caps][:avd] = device.fetch('avd', nil)
      end

      caps[:appium_lib][:server_url] = ENV['SERVER_URL']
      caps
    end
def load_capabilities(caps)
      device = @server.device_data
      unless device.nil?
        caps[:caps][:udid] = device.fetch('udid', nil)
        caps[:caps][:platformVersion] = device.fetch('os', caps[:caps][:platformVersion])
        caps[:caps][:deviceName] = device.fetch('name', caps[:caps][:deviceName])
        caps[:caps][:wdaLocalPort] = device.fetch('wdaPort', nil)
        caps[:caps][:avd] = device.fetch('avd', nil)
      end

      caps[:appium_lib][:server_url] = ENV['SERVER_URL']
      caps
    end
Load capabilities based on current device data