Testing iOS Face ID with Appium

June 29, 2026 · 6 min read · Mobile Testing

HeadSpin Platform
Automated & amp; manual testing make easy through datum science insights.
Differentiating capabilities:
  • Extensive end-to-end automation of QA process
  • Comparative analysis of app performance against equal
  • Continuous monitoring of app performance using synthetic information for higher availability of apps
  • Easy-to-use developer friendly platform
cloudtest go
Affordable Real Device Testing for Emerging Teams
cloudtest go
Affordable Existent Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized mobile test executing in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based testing

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Testing iOS Face ID with AppiumTesting iOS Face ID with Appium

Testing iOS Face ID with Appium

Published on
July 31, 2019
Updated on
Published on
March 14, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

It & # x27; s be almost two geezerhood since iOS device started supporting Face ID. This lineament is incredibly handy to users, and anticipate in major apps, yet the integrating can be cunning and I & # x27; ve see some corner cases handle gravely. Appium is able to support testing in-app authentication with Face ID on iOS simulators, since the simulator app has this capability built into it.

There are only three limited controls provided by the simulator, and Appium ply the same three actions:

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

  • enroll
  • matching face
  • non-matching face

enroll sets up the device for Face ID. This is equivalent to scanning your face during device setup and enable the lineament. You can toggle this on and off, to make sure that your app act for users who have opted out of the technology.

The command can be sent via one of Appium & # x27; s usancemobile: script commands.

driver.executeScript (`` mobile: enrollBiometric '', ImmutableMap.of (`` isEnabled '', true));

This command should be called once the test session has started. Don & # x27; t care about calling it twice, pose the like value that & # x27; s been set before doesn & # x27; t cause an error. The simulator will recall the value it & # x27; s be set to though, so don & # x27; t bet on it being in a certain state at the beginning of a test run.

Once enabled, we need to perform whatever action in the app results in prompting for a face to unlock it. Once prompted, we can then either present the device with the correct simulated face, or an incorrect face.

driver.executeScript (`` mobile: sendBiometricMatch '', ImmutableMap.of (`` type '', `` faceId '', `` match '', true)); // or driver.executeScript (`` mobile: sendBiometricMatch '', ImmutableMap.of (`` character '', `` faceId '', `` match '', false));

Replacing faceId with touchId will execute the same function but for the elderly fingerprint ID lineament.

I found a usefuldemo app on githubwhich has a simple Face ID login button to test this on. Below is a complete test. The entire code file and a compiled demo app can be found in ourexample code repository:

public family Edition080_iOS_FaceId {// App provide by https: //github.com/zaimramlan/iOSBiometricLogin File classpathRoot = new File (System.getProperty (`` user.dir '')); File appDir = new File (classpathRoot, `` .. /apps/ ''); String app = new File (appDir.getCanonicalPath (), `` BiometricLogin.app '') .getAbsolutePath (); private IOSDriver driver; public Edition080_iOS_FaceId () throws IOException {} @ Before public void setUp () throws IOException {DesiredCapabilities crest = new DesiredCapabilities (); caps.setCapability (`` platformName '', `` iOS ''); caps.setCapability (`` platformVersion '', `` 12.4 ''); caps.setCapability (`` deviceName '', `` iPhone Xs ''); caps.setCapability (`` automationName '', `` XCUITest ''); caps.setCapability (`` app '', app); driver = new IOSDriver(new URL (`` http: //localhost:4723/wd/hub ''), cap);} @ After public void tearDown () {try {driver.quit ();} catch (Exception ign) {}} @ Test public void testIOSFaceId () {driver.executeScript (`` mobile: enrollBiometric '', ImmutableMap.of (`` isEnabled '', true)); WebElement loginButton = driver.findElementByAccessibilityId (`` Log In ''); loginButton.click (); driver.switchTo () .alert () .accept (); driver.executeScript (`` mobile: sendBiometricMatch '', ImmutableMap.of (`` eccentric '', `` faceId '', `` lucifer '', true)); WebDriverWait look = new WebDriverWait (driver, 5); wait.until (ExpectedConditions.presenceOfElementLocated (By.name (`` Log Out ''))); WebElement logoutButton = driver.findElementByAccessibilityId (`` Log Out ''); logoutButton.click (); wait.until (ExpectedConditions.presenceOfElementLocated (By.name (`` Log In ''))); loginButton = driver.findElementByAccessibilityId (`` Log In ''); loginButton.click (); driver.executeScript (`` mobile: sendBiometricMatch '', ImmutableMap.of (`` case '', `` faceId '', `` match '', false)); wait.until (ExpectedConditions.alertIsPresent ()); driver.switchTo () .alert () .dismiss ();}}
Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamic and results-driven Content Marketing Specialist with 8+ years of experience in crafting engaging narration and marketing collateral across diverse industries. She excel in collaborating with cross-functional squad to evolve innovative substance strategies and render compelling, reliable, and impactful content that resonate with target hearing and enhances make legitimacy.

LinkedIn

Testing iOS Face ID with Appium

4 Parts

regression intelligence blog
-

Regression Intelligence pragmatic usher for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guide for advanced users (Part 4)

Coming Soon

Discover how HeadSpin can empower your business with superior quiz capabilities

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, gain a competitive edge
faster development cycles
Boost developer/QA productiveness with faster development cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for ordered consequence
gain better visibility into functional & performance issues
Gain better visibility into functional and execution issues
reduce mean time
Reduce meanspirited time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content caliber of experience (QoE) effortlessly
The trusted choice for global enterprisingness
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can endue your business with superior testing capacity

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitory edge
faster development cycles
Boost developer/QA productivity with quicker development cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain better visibility into functional and performance issues
reduce mean time
Reduce base time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content quality of experience (QoE) effortlessly
The sure choice for global enterprises
Close

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster evolution cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for ordered answer
gain better visibility into functional & performance issues
Gain best visibility into functional and performance issues
reduce mean time
Reduce mean time to identify/resolve during exam, QA, and production
evaluate audio, video & qoe
Evaluate audio, picture, and content lineament of experience (QoE) effortlessly
The trusted option for world-wide endeavour
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free