Contents

AXUIElementCopyAttributeValue(_:_:_:)

Returns the value of an accessibility object's attribute.

Declaration

func AXUIElementCopyAttributeValue(_ element: AXUIElement, _ attribute: CFString, _ value: UnsafeMutablePointer<CFTypeRef?>) -> AXError

Parameters

  • element:

    The AXUIElementRef representing the accessibility object.

  • attribute:

    The attribute name.

  • value:

    On return, the value associated with the specified attribute.

Return Value

If unsuccessful, AXUIElementCopyAttributeValue may return one of the following error codes, among others:

kAXErrorAttributeUnsupported

The specified AXUIElementRef does not support the specified attribute.

kAXErrorNoValue

The specified attribute does not have a value.

kAXErrorIllegalArgument

One or more of the arguments is an illegal value.

kAXErrorInvalidUIElement

The AXUIElementRef is invalid.

kAXErrorCannotComplete

The function cannot complete because messaging has failed in some way.

kAXErrorNotImplemented

The process does not fully support the accessibility API.

See Also

Miscellaneous