XCUITest Reference
SkillDev toolsLets your agent write XCUITest UI tests for iOS apps with ready-made code examples and Apple API references.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the XCUITest Reference skill
About this skill
API reference: XCUITest. Query for element queries, waiting patterns, Swift 6 @MainActor, assertions, screenshots, launch arguments.
What this skill tells your AI
The instructions your AI receives, as published by prisma-labs-dev/apple-skills in skills/xcuitest/SKILL.md and read by ahel’s review.
Comprehensive reference for writing reliable XCUITest UI tests in Swift 6.
Quick Reference
// Basic test structure
@MainActor
final class MyUITests: XCTestCase {
var app: XCUIApplication!
override func setUp() {
super.setUp()
continueAfterFailure = false
app = XCUIApplication()
app.launch()
}
func testExample() {
let button = app.buttons["Submit"]
XCTAssertTrue(button.waitForExistence(timeout: 5))
button.tap()
}
}
Topic Guides
Curated guidance with code examples (grep-friendly):
| File | Content |
|---|---|
| element-queries.md | Core API classes: XCUIApplication, XCUIElement, XCUIElementQuery, XCUICoordinate |
| interactions.md | Taps, presses, text input, swipes, coordinate-based and other gestures |
| waiting.md | waitForExistence, XCTWaiter, non-existence, property waits, Xcode 26 KeyPath waits |
| swift6-concurrency.md | Swift 6 strict concurrency: @MainActor test classes, async setUp/tearDown, nonisolated |
| assertions.md | XCTAssert patterns, custom messages, existence checks |
| screenshots.md | Screenshots, XCTAttachment, screenshot-on-failure, extracting from .xcresult |
| launch-arguments.md | Launch arguments/environment, UserDefaults override, localization and accessibility testing |
| permissions.md | resetAuthorizationStatus, XCUIProtectedResource, interruption monitors, springboard/system alerts |
| test-helpers.md | Page Object Model, reusable helpers, timeout constants |
| troubleshooting.md | Common failures (element not found, flaky tests) and what's new in Xcode 26 / iOS 26 |
| patterns.md | Advanced patterns: base test class, system dialogs, scroll/wait, debugging, test organization |
Downloaded Reference Files
Apple documentation pages available locally:
| File | Content |
|---|---|
| xctest-index.md | Full XCTest framework index |
| xcuiautomation-index.md | Full XCUIAutomation framework index |
| xcuiapplication.md | XCUIApplication class |
| xcuielement.md | XCUIElement class |
| xcuielementquery.md | XCUIElementQuery class |
| xcuicoordinate.md | XCUICoordinate class |
| xcuiprotectedresource.md | XCUIProtectedResource enum |
| xcuiscreenshot.md | XCUIScreenshot class |
Sources
Apple Documentation
- XCTest | Apple Developer Documentation
- XCUIAutomation | Apple Developer Documentation
- XCUIElementQuery | Apple Developer Documentation
- waitForExistence | Apple Developer Documentation
- wait(for:toEqual:timeout:) | Apple Developer Documentation
- resetAuthorizationStatus(for:) | Apple Developer Documentation
- XCUIProtectedResource | Apple Developer Documentation
- XCUIScreenshot | Apple Developer Documentation
WWDC Sessions
Community Resources
- XCTest Meets @MainActor | Quality Coding
- Issues with setUp() and tearDown() in XCTest for Swift 6 | Swift Forums
- Waiting in XCTest | Masilotti.com
- UI Testing Cheat Sheet | Masilotti.com
- XCUIElement Actions and Gestures | Apps Developer Blog
- Configuring UI tests with launch arguments | polpiella.dev
- UI Testing improvements in Xcode 16 | Jesse Squires
Fetching More Apple Docs
- Search this skill's local
.mdfiles first. - If the topic is not here, check the other installed Apple skills you have available by their names, descriptions, or
SKILL.mdfrontmatter, then grep their local files. This is faster and uses less context than fetching new docs from the internet. - If no installed skill has the page, use the relevant documentation path from the local XCTest or XCUIAutomation indexes with the
sosumi.aiMarkdown mirror. For example,/documentation/xcuiautomation/xcuielementmaps tohttps://sosumi.ai/documentation/xcuiautomation/xcuielement.
Signals
- GitHub stars
- 338
- Forks
- 19
- Last commit
- Sep 2026
ahel review
K1binfo
installs-packages (in screenshots.md)
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
xcuitest- Source
- github.com/prisma-labs-dev/apple-skills
github.com/prisma-labs-dev/apple-skills
Related picks
Skill · emilkowalski
The pick for Swiftswift-concurrency-expert
Skill · davila7
The pick for Swiftlark-markdown
Skill · larksuite
The pick for Markdownmarkdown-mermaid-writing
Skill · k-dense-ai
The pick for Markdownteach
Skill · mattpocock
More in Dev toolsimplement
Skill · mattpocock
More in Dev tools