<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIElement/AttributeName",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:@T@XCUIElementAttributeName"
  },
  "title" : "XCUIElement.AttributeName"
}
-->

# XCUIElement.AttributeName

A set of string constants that serve as keys for storing element attributes in a dictionary.

```
struct AttributeName
```

## Topics

### Keys

[`XCUIElementAttributeNameChildren`](/documentation/XCUIAutomation/XCUIElement/AttributeName/children)

A string constant that serves as a dictionary key identifying an element’s children.

[`XCUIElementAttributeNameElementType`](/documentation/XCUIAutomation/XCUIElement/AttributeName/elementType)

A string constant that serves as a dictionary key identifying an element’s type.

[`XCUIElementAttributeNameEnabled`](/documentation/XCUIAutomation/XCUIElement/AttributeName/enabled)

A string constant that serves as a dictionary key identifying whether an element is enabled.

[`XCUIElementAttributeNameFrame`](/documentation/XCUIAutomation/XCUIElement/AttributeName/frame)

A string constant that serves as a dictionary key identifying an element’s frame.

[`XCUIElementAttributeNameHasFocus`](/documentation/XCUIAutomation/XCUIElement/AttributeName/hasFocus)

A string constant that serves as a dictionary key identifying whether an element has focus.

[`XCUIElementAttributeNameHorizontalSizeClass`](/documentation/XCUIAutomation/XCUIElement/AttributeName/horizontalSizeClass)

A string constant that serves as a dictionary key identifying an element’s horizontal size class.

[`XCUIElementAttributeNameIdentifier`](/documentation/XCUIAutomation/XCUIElement/AttributeName/identifier)

A string constant that serves as a dictionary key identifying an element’s identifier.

[`XCUIElementAttributeNameLabel`](/documentation/XCUIAutomation/XCUIElement/AttributeName/label)

A string constant that serves as a dictionary key identifying an element’s label.

[`XCUIElementAttributeNamePlaceholderValue`](/documentation/XCUIAutomation/XCUIElement/AttributeName/placeholderValue)

A string constant that serves as a dictionary key identifying an element’s placeholder value.

[`XCUIElementAttributeNameSelected`](/documentation/XCUIAutomation/XCUIElement/AttributeName/selected)

A string constant that serves as a dictionary key identifying whether an element is selected.

[`XCUIElementAttributeNameTitle`](/documentation/XCUIAutomation/XCUIElement/AttributeName/title)

A string constant that serves as a dictionary key identifying an element’s title.

[`XCUIElementAttributeNameValue`](/documentation/XCUIAutomation/XCUIElement/AttributeName/value)

A string constant that serves as a dictionary key identifying an element’s value.

[`XCUIElementAttributeNameVerticalSizeClass`](/documentation/XCUIAutomation/XCUIElement/AttributeName/verticalSizeClass)

A string constant that serves as a dictionary key identifying an element’s vertical size class.

### Initializers

[`init(rawValue:)`](/documentation/XCUIAutomation/XCUIElement/AttributeName/init(rawValue:))

Creates an attribute name dictionary key from a string value.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)