appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
40 lines • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mobileEnrollBiometric = mobileEnrollBiometric;
exports.mobileSendBiometricMatch = mobileSendBiometricMatch;
exports.mobileIsBiometricEnrolled = mobileIsBiometricEnrolled;
const utils_1 = require("../utils");
/**
* 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 (0, utils_1.requireSimulator)(this, 'Biometric enrollment').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 (0, utils_1.requireSimulator)(this, 'Sending biometric match').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 (0, utils_1.requireSimulator)(this, 'Checking biometric enrollment').isBiometricEnrolled();
}
//# sourceMappingURL=biometric.js.map