xcuitest

Reference XCUITest APIs for UI testing in Swift with Xcode 16+.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/annurdien/skills --skill xcuitest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xcuitest
Source: https://github.com/annurdien/skills/tree/main/xcuitest
Command: npx skills add https://github.com/annurdien/skills --skill xcuitest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Comprehensive reference for building reliable XCUITest UI tests in Swift, consolidating API usage, patterns, and best practices.

Core Features & Use Cases

  • API coverage: XCUIApplication, XCUIElement, XCUIElementQuery, XCUICoordinate, XCUIScreenshot, and related APIs.
  • Interaction patterns: tapping, swiping, coordinate-based gestures, text input, and coordinate-based actions.
  • Advanced topics: waiting mechanisms, test organization patterns, permission handling, and system/dialog interruptions across iOS.

Quick Start

Launch a minimal UI test that starts XCUIApplication and taps a button to verify interaction.

Frequently Asked Questions about xcuitest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a UI test in Swift that waits for an element to appear?

XCUITest UI testing in Swift provides waiting mechanisms to handle asynchronous element loading. You use expectations and predicates to wait for XCUIElementQuery results, ensuring tests pause reliably until the interface is ready for interaction.

What's the best way to handle system permission dialogs during iOS UI testing?

XCUITest UI testing handles system permission dialogs by monitoring interruptions. You configure UIInterruptionMonitor to automatically dismiss alerts for HealthKit or location permissions during your iOS testing workflow.

Can I capture screenshots of my iOS app using XCUITest?

XCUITest UI testing supports capturing screenshots through XCUIScreenshot APIs. You attach screenshots to test reports, providing visual verification of coordinate-based actions, swiping, and tapping interactions within your iOS app.

How do I perform coordinate-based gestures in Xcode UI tests?

XCUITest UI testing uses XCUICoordinate to perform coordinate-based gestures. You create normalized coordinate references on the screen to execute precise taps, swipes, and complex interaction patterns within your Swift testing environment.

Does XCUITest work with Xcode 16 for iOS app testing?

XCUITest UI testing is fully compatible with Xcode 16 and later versions. It provides comprehensive API coverage for XCUIApplication and XCUIElement, allowing developers and QA engineers to build reliable interaction patterns for iOS apps.