GREAT LOTUS PYAUTO WEB icon

GREAT LOTUS PYAUTO WEB

10 action groups: ManagerAction, MouseAction, KeyboardAction, BrowserControl, ElementAction, ImageAction, OthersAction, EmailAction, DeveloperAction, General Debug

5. Element → get_attribute

AI-generated

Summary

Publishes a request over MQTT to a remote PyAutoGUI web client to retrieve a specific DOM attribute of a web element.

Inputs

  • topic (required) — The MQTT topic to publish the request to. Used to route the command to a specific client or function group.
  • Remote Port (required) — The remote debugging port (CDP) used to route the command to the correct browser session on the worker machine. Usually copied from the 'Browser Connect' node.
  • Attribute (required) — The name of the DOM attribute to retrieve (e.g., 'href', 'value', 'class', or 'text' for visible text).
  • Target — A CSS selector (prefixed with 'css=', 'id=', or 'text=') pointing to the target element.
  • XPath — An XPath expression to locate the target element, used when CSS selectors are insufficient.
  • Timeout (sec) — The maximum time (in seconds) to wait for the attribute retrieval before failing.
  • QoS — The MQTT Quality of Service level (0, 1, or 2).
  • Wait For Response — If true, the workflow pauses and waits for the MQTT response payload before proceeding.
  • Response Timeout (sec) — The maximum time to wait for the response payload when 'Wait For Response' is enabled.
  • Delay Next Step (ms) — A delay (milliseconds) applied before the node moves to the next step. If 'Wait For Response' is enabled, this delay occurs after the response is received.
  • Include Input Items — If true, attaches the data from the previous node into the payload under the 'inputItems' field.
  • Include Input Fields — When 'Include Input Items' is true, a comma-separated list of field paths (e.g., 'id,name') to extract and include from the input items.

Output shape

One output item per input item, containing the requested attribute value in the attribute field (or text if specified), plus any included input data.

The actual data is returned via the MQTT response payload. If 'Wait For Response' is disabled, the node returns immediately after publishing.

Examples

Example 1: Retrieve the 'href' attribute of a link with a specific CSS selector.

Topic: pyauto/action, Remote Port: 127001, Attribute: href, Target: css=.footer-link[1]

Example 2: Get the visible text content of a specific button.

Topic: pyauto/action, Remote Port: 127001, Attribute: text, Target: id=submitButton

Example 3: Wait for the result of a previous step before proceeding.

Wait For Response: true, Response Timeout: 10, Include Input Items: true, Include Input Fields: id, status

Links

Discussion