How to use the appium-ios-device.utilities.getConnectedDevices function in appium-ios-device

To help you get started, we’ve selected a few appium-ios-device examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appium / appium-xcuitest-driver / lib / utils.js View on Github external
async function detectUdid () {
  log.debug('Auto-detecting real device udid...');
  const udids = await utilities.getConnectedDevices();
  if (_.isEmpty(udids)) {
    throw new Error('No device is connected to the host');
  }
  const udid = _.last(udids);
  if (udids.length > 1) {
    log.warn(`Multiple devices found: ${udids.join(', ')}`);
    log.warn(`Choosing '${udid}'. If this is wrong, manually set with 'udid' desired capability`);
  }
  log.debug(`Detected real device udid: '${udid}'`);
  return udid;
}
github appium / appium-xcuitest-driver / lib / real-device-management.js View on Github external
async function getConnectedDevices () {
  return await utilities.getConnectedDevices();
}