Biometrics
Answer a fingerprint, Face ID or PIN prompt from your Appium script — pass, fail or cancel — so biometric login, payment and unlock branches run in your suites.
Apps that open with a biometric prompt would block an automated run with no one to approve it. TestKase lets your script answer the prompt — pass, fail, or cancel — so those branches run unattended.
Prepare the app
Biometrics is a per-build setting you turn on once, the same way as for a Live session:
- Upload your app (or pick one from My apps) — see Uploading your app.
- Open App settings (the ⚙ next to the build) and switch Biometric on.
- Wait for the build to show Ready — a copy is prepared for biometric testing (about a minute the first time). Your uploaded file is untouched.
Any session that runs that prepared build can then answer its prompts. To run a build without answering biometrics, opt the session out:
"testkase:options": { "biometric": false },Works on Android and iPhone, on real devices and virtual ones. The mechanics differ by platform (below), because the prompt is a system dialog on Android and an in-app sheet on iOS.
Android — answer with testkase_action
Android's biometric prompt is a system dialog your script cannot reach. Instead, send one testkase_action and TestKase answers the app's open prompt for you:
// result: "pass" | "fail" | "cancel"
await driver.executeScript('testkase_action: {"action":"biometric","arguments":{"result":"pass"}}');- pass — the system reports a match; the app proceeds as after a successful scan.
- fail — a mismatch, for the retry and lock-out branches.
- cancel — the prompt is dismissed, for the PIN / alternative-sign-in fallback.
Send it when the app is waiting on its prompt. The call returns once the answer is delivered; the device never shows anything your script has to tap.
iPhone — tap the sheet
On iOS the prompt is a sheet inside the app with Pass, Fail and Cancel buttons, so you answer it like any other control — no testkase_action needed:
// XPath
await driver.findElement('-xpath', '//XCUIElementTypeButton[@name="Pass"]').click();
// or by accessibility id
await driver.findElement('accessibility id', 'Pass').click();Use Fail or Cancel the same way.
Notes
- The three results map to the same outcomes as a Live session, so a flow you verified by hand reproduces in a script.
- Covered prompts: fingerprint (Touch ID), Face ID, and the device passcode fallback.
- It is a simulated result through the OS testing hooks — your real authentication code runs; no sensor, enrollment or anti-spoofing is exercised.
Uploading your app
Try a demo app with no upload, then upload your own .ipa, .apk or simulator build — and what happens to an iOS build along the way.
Camera injection
Set your app's camera to a chosen still image from your Appium script — so QR, barcode and document-scan branches run in your suites without a real camera.
