# Supported Attributes for macOS

> Supported attributes and activities for desktop application automation in a macOS environment.

The following tables present the supported attributes for desktop applications in a macOS environment, from the **Get Attribute** activity.

## Window attributes

| **Attribute** | **Description** |
| --- | --- |
| app | The process name such as Google Chrome, Safari, Calculator (String). |
| title | It specifies extra information about an element (String). Most often shown as a tooltip text when the mouse moves over the element. |
| tid | The identifier of the thread that created the window containing the element (Int32). |
| pid | The process identifier (Int32). |
| role | The role of an element (String). E.g. button, link. |
| enabled | Indicates if the element is enabled (Boolean). |
| focused | Indicates if the element is focused (Boolean). |
| selected | Indicates if the element is selected (Boolean). |
| expanded | Indicates if the element is expanded (Boolean). |
| subsystem | The subsystem used to generate the selector (String). E.g. `<wnd />`. |
| text | The text content of the element (String). |
| AppPath | The fully qualified path of the process' folder (String). E.g. `/System/Applications/Calendar.app/Contents/MacOS/Calendar`. |
| AppCmdLine | A string representing the arguments used to start the process the target belongs to. For example, it would return `-jar /Applications/TestApps/SwingSet2_withJava8.jar` for an application started with the command line: `/usr/bin/java -jar /Applications/TestApps/SwingSet2_withJava8.jar`. |
| isminimized | Returns `true` if the application is minimized, `false` otherwise (String). |
| ismaximized | Returns `true` if the application is maximized, `false` otherwise (String). |
| hwnd | It retrieves the native window handle (Int32). |
| position | The element position (Rectangle). |
| scaleFactor | Retrieves the scale factor that is currently applied to this element (Double). On macOS scale factor and DPI scale factor are generally equal to 1. |
| displayDpiScaleFactor | Retrieves the DPI scale factor of the display on which this element is placed (Double). On macOS scale factor and DPI scale factor are generally equal to 1. |
| IsJavaWindow | Checks if the given window implements the Java Accessibility API (Boolean). |
| relativeVisibility | The (partial) visibility of an element inside all of its ancestors (Boolean) |
| visibility | It specifies a value corresponding to the following visibility levels: 0 - Visible, 1 - Hidden, 2 - Offscreen, 3 - Partial (NVisibilityLevel). |
| foreground | Indicates if the process or browser tab is in foreground or not (Boolean). |
| disabled | Indicates if the element is disabled (Boolean). |
| readonly | Indicates if the element is read only (Boolean). |
| checked | Indicates if the element is pre-selected (Boolean). |
| items | All items of a dropdown element or list. |
| selecteditem | The selected item of a dropdown element (String). |
| selecteditems | Selected items, if the element supports multiple selection. |
| isSapWinGuiSession | Indicates if the application is a SAP application (Boolean). |
| sapClient | Available for SAP windows. |
| sapLanguage | Available for SAP windows. |
| sapProgram | Available for SAP windows. |
| sapReadyState | Available for SAP windows. |
| sapScreen | Available for SAP windows. |
| sapSession | Available for SAP windows. |
| sapSysName | Available for SAP windows. |
| sapSysNumber | Available for SAP windows. |
| sapSysSessionId | Available for SAP windows. |
| sapTransaction | Available for SAP windows. |
| sapUser | Available for SAP windows. |
| sapScriptingStatus | Enum (UiSapScriptingStatus) representing the state of availabilty for SAP scripting. The following values are relevant:  UI_SAP_SCRIPTING_INTERNAL_ERROR = 0, UI_SAP_SCRIPTING_DISABLED_BY_ADMINISTRATOR = 2  Available for SAP windows. |

## Java attributes

| **Attribute** | **Description** |
| --- | --- |
| aaname | The UI element name. It represents the text that is displayed, such as 'Submit' on a button or 'First Name' for an edit box. (String). |
| accessibleClass | The accessible Java class of the element (String). |
| accessibleFullClass | The fully qualified accessible Java class of the element (String). |
| backgroundColor | The background color of the element formatted as ‘(Red, Green, Blue, Alpha)’ (String). |
| baseClassName | The underlying base Java class of the element (String). |
| checked | An attribute which specifies that an element is pre-selected (Boolean). |
| cls | It specifies one or more CSS classnames for an element. Or the class name of a native window handle (String). |
| editable | Indicates if the element is editable (Boolean). |
| enabled | Indicates if the element is enabled (Boolean). |
| expanded | Indicates if the element is expanded (Boolean). |
| focused | Indicates if the element is focused (Boolean). |
| foregroundColor | The foreground color of the element formatted as ‘(Red, Green, Blue, Alpha)’ (String). |
| fullClassName | The fully qualified name of the Java class of the element (String). |
| hasFocus | Indicates whether the element has focus or not (Boolean). |
| hasTableAncestor | Indicates whether the element has an ancestor with role ‘table’ or not (Int32). |
| hwnd | It retrieves the native window handle (Int32). |
| javastate | A list with all the available states of a java type of control (String). E.g. enabled, visible, editable. |
| position | The element position (Rectangle). |
| role | The role of an element (String). E.g. button, link |
| selected | Indicates if the element is selected (Boolean). |
| selecteditem | The selected item of a dropdown element (String). |
| text | The text content of the element (String) |
| title | It specifies extra information about an element (String). Most often shown as a tooltip text when the mouse moves over the element. |
| virtualname | The accessible virtual name of the element (String). E.g. the static text label for a combo box. |
| visible | Indicates if the element is visible (Boolean). |
| rowCount | Available for Table elements. |
| columnCount | Available for Table elements. |
| tableRow | Available for Table elements. |
| tableCol | Available for Table elements. |
| rowName | Available for Table elements. |
| colName | Available for Table elements. |
| componentName |  |
| treeDepth |  |
| isExpanded |  |
| selecteditems | Selected items, if the element supports multiple selection. |
| items |  |

## SAP attributes

| **Attribute** | **Description** |
| --- | --- |
| aastate | An array of element states, for example, "visible, enabled, selected". (String). |
| checked | Available for the following element types: `GuiCheckBox`, `GuiRadioButton`, `GuiGridViewRow`, `GuiGridViewColumn`, `GuiGridViewCell`, `GuiGridViewAllItems`, `GuiTreeItem`, `TableCol`, `TableRow`, `TableAllItems`. |
| colorIndex | Available for the following element types: `GuiCheckBox`, `GuiLabel`. |
| colorIntensified | Available for the following element types: `GuiCheckBox`, `GuiLabel`. |
| colorInverse | Available for the following element types: `GuiCheckBox`, `GuiLabel`. |
| colName | Available for the following element types: `GuiGridViewColumn`, `GuiGridViewCell`. |
| colTooltip | Available for the following element types: `GuiGridViewCell`, `GuiGridView`. |
| columnCount | Available for the following element types: `GuiTableControl`, `TableCell`. |
| focused | Indicates if the element is focused (Boolean). |
| focuseditem | Available for `GuiTree`. |
| hasFocus | Indicates whether the element has focus or not (Boolean). |
| id | Available for all SAP controls. |
| itemId | Available for `GuiTreeItem`. |
| items |  |
| labeledby | Available for all SAP controls. |
| leafid | Available for all SAP controls. |
| maxLength | Available for the following element types: `GuiTextField`, `GuiCTextField`, `GuiPasswordField`. |
| name | Available for all SAP controls. |
| position | The element position (Rectangle). |
| relpath | Available for `GuiTreeNode`. |
| role | The role of an element (String). E.g. button, link |
| rowCount | Available for the following element types: `GuiTableControl`, `GuiGridView`. |
| sapClient | Available for both SAP windows and SAP controls. |
| sapLanguage | Available for both SAP windows and SAP controls. |
| sapProgram | Available for both SAP windows and SAP controls. |
| sapReadyState | Available for both SAP windows and SAP controls. |
| sapScreen | Available for both SAP windows and SAP controls. |
| sapSession | Available for both SAP windows and SAP controls. |
| sapSysName | Available for both SAP windows and SAP controls. |
| sapSysNumber | Available for both SAP windows and SAP controls. |
| sapSysSessionId | Available for both SAP windows and SAP controls. |
| sapTransaction | Available for both SAP windows and SAP controls. |
| sapUser | Available for both SAP windows and SAP controls. |
| sapScriptingStatus | Enum (UiSapScriptingStatus) representing the state of availabilty for SAP scripting. The following values are relevant:  UI_SAP_SCRIPTING_INTERNAL_ERROR = 0, UI_SAP_SCRIPTING_DISABLED_BY_ADMINISTRATOR = 2 |
| scrollmax | Available for `GuiTableControl`. |
| scrollmin | Available for `GuiTableControl`. |
| scrollpagesize | Available for `GuiTableControl`. |
| scrollpos | Available for `GuiTableControl`. |
| selecteditem | The selected item of a dropdown element (String).  Available for the following element types: `GuiTree`, `GuiComboBox`, `GuiTabStrip`. |
| selectedItems | Selected items, if the element supports multiple selection. |
| statusMessage | Available for the following element types: `GuiStatusbar`, `GuiStatusPane`. |
| statusMessageId | Available for the following element types: `GuiStatusbar`, `GuiStatusPane`. |
| statusMessageNumber | Available for the following element types: `GuiStatusbar`, `GuiStatusPane`. |
| statusParameters | Available for the following element types: `GuiStatusbar`, `GuiStatusPane`. |
| statusType | Available for the following element types: `GuiStatusbar`, `GuiStatusPane`. |
| subsystem | The subsystem used to generate the selector (String). The selector's second level tag: webctrl, ctrl, uia, java, silverlight, sap. |
| tableCol | Available for the following element types: `GuiGridViewColumn`, `GuiGridViewCell`, `TableCell`. |
| tableRow | Available for the following element types: `GuiGridViewRow`, `GuiGridViewCell`, `TableCell`. |
| text | It refers to all of the font, style, alignment, and other formatting associated with a given character or series of characters (String).  Available for all SAP controls. |
| title | It specifies extra information about an element (String). Most often shown as a tooltip text when the mouse moves over the element. |
| tooltip | Available for all SAP controls. |
| type | Available for all SAP controls. |
| virtualname | The accessible virtual name of the element (String). E.g. the static text label for a combo box. |
| visibility | It specifies a value corresponding to the following visibility levels: 0 - Visible, 1 - Hidden, 2 - Offscreen, 3 - Partial (NVisibilityLevel). |
| visible | Indicates if the element is visible (Boolean). |

## AX attributes

| **Attribute** | **Description** |
| --- | --- |
| role | The role of an element (String). E.g. button, link |
| subrole | Subrole of an element, provides additional info on the element. E.g.: AXCloseButton |
| name | The accessible name of the element (String). |
| title | It specifies extra information about an element (String). Most often shown as a tooltip text when the mouse moves over the element. |
| identifier | Unique identifier of an element that is often provided by the application. It is not necessarily consistent across application versions and OS versions. |
| filename | Provides specific information for elements that represent FIles, for example, file items in Finder application. |
| url | It specifies the URL of a browser tab. It can also be found on items that represent file items in Finder application and represent a full path to the file: `file:///Users/{username}/Documents/EditableNonEditable/` (String). |
| value | Gives the value of an element. Represented by the text for text elements, 0 or 1 for checkboxes, and so on (String). |
| help | Provides an additional description text for the element (String). |
| enabled | Indicates if the element is enabled (Boolean). |
| focused | Indicates if the element is focused (Boolean). |
| selected | Indicates if the element is selected (Boolean). |
| expanded | Indicates if the element is expanded (Boolean). |
| checked | Indicates if the element is pre-selected (Boolean). |
| items |  |
| selecteditem | The selected item of a dropdown element (String). |
| selecteditems | Selected items, if the element supports multiple selection. |
| rowCount | Available for Table elements. |
| columnCount | Available for Table elements. |
| tableRow | Available for Table elements. |
| tableCol | Available for Table elements. |
| rowName | Available for Table elements. |
| colName | Available for Table elements. |
