Skip to content

Win Get Attribute

Type: win-get-attribute  ·  Package: Desktop Activities v1.0.0  ·  Output: object

Gets a specific property of an element: whether it is enabled, whether it is visible, its value, its name, whether it is checked, etc. Useful for making decisions based on the state of the interface — waiting for a button to be enabled, checking if a box is checked, reading the coordinates of a control.

Locates the element by its selector and returns the value of the property indicated in attribute.

ParameterEditorDescription
selectorselectorThe element to consult.
attributelistProperty to obtain (see table below).
AtributoReturns
enabledIs it enabled? (boolean)
visibleIs it visible? (boolean)
valueThe value of control
nameThe name of the control
checkedIs it marked? (boxes/radios)
selectedIs it selected?
existsDoes the element exist?
boundsThe coordinates/size of the control
ParameterEditorDescription
sessionsessionWin Attach session. If omitted, the selector must include the window.
timeoutnumberMaximum ms to wait for the element. By default 30000.

Returns a object with the property value (boolean, text, etc., depending on the attribute).

Act only if the button is enabled:

Win Get Attribute selector = (botón "Procesar") attribute = enabled → output: habilitado
If condition = = toBoolean(habilitado)
└─ then:
Win Click selector = (botón "Procesar")