Element Attributes
The Mac2 driver has a limited set of supported element attributes.
Refer to the XCUIElementAttributes protocol documentation for more details on each attribute.
elementType¶
Example:
2
Corresponds to the element's XCTest elementType
integer-encoded value.
identifier¶
Example:
identifier
Corresponds to the element's XCTest identifier
value. Can be null.
label¶
Examples:
my label
Corresponds to the element's XCTest label
value. Can be null.
title¶
Examples:
my title
Corresponds to the element's XCTest title
value. Can be null.
value¶
Example:
1.5
Corresponds to the element's XCTest value
value.
The value of this attribute depend on the actual element type. For example, for text fields this could be their text contents, for sliders this could be the float position value, while for switches this could be either 1 or 0.
placeholderValue¶
Example:
my placeholder
Corresponds to the element's XCTest placeholderValue
value.
enabled¶
Example:
false
Corresponds to the element's XCTest enabled
value.
selected¶
Example:
false
Corresponds to the element's XCTest selected
value.
focused¶
Example:
true
Corresponds to the element's XCTest hasFocus
value. Available since driver version 1.3.0.
hittable¶
Example:
true
Corresponds to the element's XCTest isHittable
value.
frame¶
Example:
{"x": 0,"y": 0,"width": 100,"height": 100}
Corresponds to the element's XCTest frame
value.