<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIElementSnapshot",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(pl)XCUIElementSnapshot"
  },
  "title" : "XCUIElementSnapshot"
}
-->

# XCUIElementSnapshot

A set of attributes to express a snapshot of an element’s attributes and descendant user interface hierarchy.

```
@MainActor protocol XCUIElementSnapshot : XCUIElementAttributes
```

## Topics

### Inspecting attributes

[`children`](/documentation/XCUIAutomation/XCUIElementSnapshot/children)

An array of descendant user interface element snapshots.

[`dictionaryRepresentation`](/documentation/XCUIAutomation/XCUIElementSnapshot/dictionaryRepresentation)

A hierarchical dictionary representation of an element’s attributes, and all of an element’s user interface descendants.

## Relationships

### Inherits From

[`XCUIElementAttributes`](/documentation/XCUIAutomation/XCUIElementAttributes)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)