XCUIAutomation provides the UI automation API that drives UI testing, exposing accessibility elements, queries, and interactions across iOS, macOS, tvOS, watchOS, and visionOS. You synthesize input using types such as XCUIKeyboardKey, XCUIGestureVelocity, and XCUIRemoteButton, and you gate access to system data with XCUIProtectedResource. The framework also surfaces accessibility audits through XCUIAccessibilityAuditType and XCUIAccessibilityAuditIssue, letting you inspect and report problems found in your interface.
Accessibility Audits 2
Run automated accessibility checks and inspect the issues they report.
- StXCUIAccessibilityAuditTypeiOS 17.0+Bitmasks for use with [XCUIApplication performAccessibilityAuditWithAuditTypes:issueHandler:error:].
- ClXCUIAccessibilityAuditIssueiOS 17.0+Represents an issue returned by an accessibility audit.
Synthesizing Input 3
Drive keyboard, gesture, and remote-control input during UI tests.
- StXCUIKeyboardKeyConstants for use with -[XCUIElement typeKey:modifierFlags:],
- StXCUIGestureVelocityA type that specifies the speed at which a synthesized gesture is performed.
- EnXCUIRemoteButton@enum XCUIRemoteButton
System Resource Access 1
Identify the protected system resources a test may request access to.
- EnXCUIProtectedResourceiOS 13.4+Constants that identify protected system resources a UI test can request access to.
Classes 11
- ClXCUIElement@class XCUIElement (/seealso XCUIElementAttributes)
- ClXCUIApplicationProxy for an application that may or may not be running.
- ClXCUICoordinateA coordinate represents a location on screen, relative to some element. Coordinates are dynamic, just like the elements to which they refer, and may compute different screen locations at different tim
- ClXCUISiriServiceiOS 10.3+@class XCUISiriService
- ClXCUILocation@class XCUILocation
- ClXCUIDeviceRepresents a device, providing an interface for simulating events involving physical buttons and device state.
- ClXCUIElementQueryObject for locating elements that can be chained with other queries.
- ClXCUIScreenRepresents an active screen of a device. One screen of each device is designated
- ClXCUIScreenshotRepresents a captured screenshot.
- ClXCUIVoiceOverServiceiOS 27.0+@class XCUIVoiceOverService
- ClXCUISystem@class XCUISystem
Protocols 5
- PrXCUIElementAttributesProtocol describing the attributes exposed on user interface elements and available during query matching. These attributes represent data exposed to the Accessibility system.
- PrXCUIElementTypeQueryProvider
- PrXCUIScreenshotProviding
- PrXCUIElementSnapshot
- PrXCUIElementSnapshotProviding