Xcuitest

Prisma-Labs-Dev/apple-skills/skills/xcuitest

by Prisma-Labs-Dev498626005e65783ebe8570a103b2335cf397768cNo licenseListed Oct 9, 2026Updated Oct 9, 2026

API reference: XCUITest. Query for element queries, waiting patterns, Swift 6 @MainActor, assertions, screenshots, launch arguments.

AI-generated overview

Reference guide for writing reliable XCUITest UI tests in Swift 6, covering queries, waits, assertions and screenshots.

What it does
This skill is an API reference for XCUITest and XCUIAutomation. It provides curated topic guides with code examples on element queries, interactions, waiting patterns, Swift 6 concurrency, assertions, screenshots, launch arguments, permissions, test helpers, troubleshooting and advanced patterns. It also bundles locally downloaded Apple documentation pages for XCTest and XCUIAutomation classes and indexes.
When to use it
Use it when writing, debugging or reviewing XCUITest UI tests for Apple platforms in Swift. It is suited to looking up API details such as waitForExistence, XCUIElementQuery, launch arguments or screenshot attachments. It also helps with Swift 6 strict concurrency issues in test classes.
Requirements
No scripts; instructions and Markdown reference files only. Reading the bundled files needs no packages or credentials, though the skill suggests network access to a documentation mirror for topics not covered locally.

XCUITest Reference

Comprehensive reference for writing reliable XCUITest UI tests in Swift 6.

Quick Reference

swift
// Basic test structure@MainActorfinal 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):

FileContent
element-queries.md [blocked]Core API classes: XCUIApplication, XCUIElement, XCUIElementQuery, XCUICoordinate
interactions.md [blocked]Taps, presses, text input, swipes, coordinate-based and other gestures
waiting.md [blocked]waitForExistence, XCTWaiter, non-existence, property waits, Xcode 26 KeyPath waits
swift6-concurrency.md [blocked]Swift 6 strict concurrency: @MainActor test classes, async setUp/tearDown, nonisolated
assertions.md [blocked]XCTAssert patterns, custom messages, existence checks
screenshots.md [blocked]Screenshots, XCTAttachment, screenshot-on-failure, extracting from .xcresult
launch-arguments.md [blocked]Launch arguments/environment, UserDefaults override, localization and accessibility testing
permissions.md [blocked]resetAuthorizationStatus, XCUIProtectedResource, interruption monitors, springboard/system alerts
test-helpers.md [blocked]Page Object Model, reusable helpers, timeout constants
troubleshooting.md [blocked]Common failures (element not found, flaky tests) and what's new in Xcode 26 / iOS 26
patterns.md [blocked]Advanced patterns: base test class, system dialogs, scroll/wait, debugging, test organization

Downloaded Reference Files

Apple documentation pages available locally:

FileContent
xctest-index.md [blocked]Full XCTest framework index
xcuiautomation-index.md [blocked]Full XCUIAutomation framework index
xcuiapplication.md [blocked]XCUIApplication class
xcuielement.md [blocked]XCUIElement class
xcuielementquery.md [blocked]XCUIElementQuery class
xcuicoordinate.md [blocked]XCUICoordinate class
xcuiprotectedresource.md [blocked]XCUIProtectedResource enum
xcuiscreenshot.md [blocked]XCUIScreenshot class

Sources

Apple Documentation

WWDC Sessions

Community Resources

Fetching More Apple Docs

  1. Search this skill's local .md files first.
  2. If the topic is not here, check the other installed Apple skills you have available by their names, descriptions, or SKILL.md frontmatter, then grep their local files. This is faster and uses less context than fetching new docs from the internet.
  3. If no installed skill has the page, use the relevant documentation path from the local XCTest or XCUIAutomation indexes with the sosumi.ai Markdown mirror. For example, /documentation/xcuiautomation/xcuielement maps to https://sosumi.ai/documentation/xcuiautomation/xcuielement.

Source and attribution

Source:Prisma-Labs-Dev/apple-skillsinskills/xcuitestat commit4986260

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal