appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
27 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mobileGetDeviceInfo = mobileGetDeviceInfo;
const lockdown_client_1 = require("../device/lockdown-client");
/**
* Returns the miscellaneous information about the device under test.
*
* Since XCUITest driver v4.2.0, this includes device information via lockdown on real devices.
* Lockdown retrieval uses {@linkcode LockdownClient}.
*
* @returns The response of `/wda/device/info'`
*/
async function mobileGetDeviceInfo() {
const infoByWda = await this.proxyCommand('/wda/device/info', 'GET');
if (this.isRealDevice()) {
const lockdown = await lockdown_client_1.LockdownClient.createForDevice(this.device.udid, this.opts, this.log);
try {
const lockdownInfo = await lockdown.getDeviceInfo();
return { ...infoByWda, lockdownInfo };
}
finally {
await lockdown.close();
}
}
return infoByWda;
}
//# sourceMappingURL=device-info.js.map