Protocol

XCUIElementAttributes

Attributes exposed by UI elements.

Declaration

@protocol XCUIElementAttributes

Overview

The XCUIElementAttributes protocol adds attribute-related functionality to the XCUIElement class. Access these properties on an instance of XCUIElement to query the current state of the UI element's attributes.

Topics

Identity

identifier

The element’s accessibility identifier.

Required.

elementType

The type of the element.

Required.

XCUIElementType

The types of UI element that can be located.

Value

value

The raw value attribute of the element.

Required.

placeholderValue

The value that is displayed when the element has no value.

Required.

title

The title attribute of the element.

Required.

label

The label attribute of the element.

Required.

Interaction State

hasFocus

Whether or not the element has UI focus.

Required.

enabled

Whether or not the element is enabled for user interaction.

Required.

selected

Whether or not the element is selected.

Required.

Size

frame

The frame of the element in the screen coordinate space.

Required.

horizontalSizeClass

The horizontal size class of the element.

Required.

verticalSizeClass

The vertical size class of the element.

Required.

XCUIUserInterfaceSizeClass

Describes the available user interface size classes.

Relationships

Conforming Types

See Also

UI Elements

XCUIElement

A UI element in an application.

XCUICoordinate

A location on screen relative to some UI element.