UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

41 lines 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mobileEnrollBiometric = mobileEnrollBiometric; exports.mobileSendBiometricMatch = mobileSendBiometricMatch; exports.mobileIsBiometricEnrolled = mobileIsBiometricEnrolled; const utils_1 = require("../utils"); const assertSimulator = (driver) => utils_1.assertSimulator.call(driver, 'Biometric enrollment'); /** * Enrolls biometric authentication on a simulated device. * * @param isEnabled - Whether to enable/disable biometric enrollment. * @throws If enrollment fails or the device is not a Simulator. * @group Simulator Only */ async function mobileEnrollBiometric(isEnabled = true) { await assertSimulator(this).enrollBiometric(isEnabled); } /** * Emulates biometric match or non-match event on a simulated device. * * The biometric feature is expected to be already enrolled via {@linkcode mobileEnrollBiometric|mobile: enrollBiometric} before executing this. * * @param type - The biometric feature name. * @param match - If `true`, simulate biometric match. If `false`, simulate biometric non-match. * @throws If matching fails or the device is not a Simulator. * @group Simulator Only */ async function mobileSendBiometricMatch(type = 'touchId', match = true) { await assertSimulator(this).sendBiometricMatch(match, type); } /** * Checks whether the biometric feature is currently enrolled on a simulated device. * * @returns `true` if biometric is enrolled. * @throws If the detection fails or the device is not a Simulator. * @group Simulator Only */ async function mobileIsBiometricEnrolled() { return await assertSimulator(this).isBiometricEnrolled(); } //# sourceMappingURL=biometric.js.map