Actions45
- Manager Actions
- Mouse Actions
- Keyboard Actions
- Browser Control Actions
- Element Actions
- Image Actions
- Others Actions
- Email Actions
- Developer Actions
- General Debug Actions
Element → get_attribute
AI-generatedSummary
Publish a request over MQTT to retrieve a specified attribute from a web page element identified by a selector, optionally waiting for and returning a response from a specified MQTT topic.
Inputs
- Topic (required) — MQTT topic to publish the request message to, identifying the action.
- QoS — Quality of Service level for the MQTT message, controlling delivery guarantees.
- Include Input Items — Whether to include selected fields from input items in the request payload.
- Include Input Items Fields — Fields from previous input data to include in payload.inputItems when enabled.
- Wait For Response — Whether to wait for a reply message on a response MQTT topic before returning output.
- Response Topic (required) — MQTT topic to subscribe and listen for the response message if waiting for a reply.
- Response Timeout (ms) — Maximum time in milliseconds to wait for the response message before timing out.
- Parse Response As JSON — Whether to parse the received response payload as JSON if possible.
- Target — High-level selector string (e.g., id=, css=, xpath=) identifying the element to query.
- XPath — Explicit XPath selector for identifying the target element, used if provided.
- Attribute (required) — Name of the attribute to retrieve from the selected element.
- Timeout (sec) — Maximum wait time in seconds for element presence or attribute retrieval before timing out.
Output shape
a list of items, each containing the original item data enriched with an mqtt property. This mqtt property includes the topic, action details, input payload, and if waiting for response, the response data with topic, raw payload, and optionally parsed JSON.
If waiting for response is enabled, the node subscribes to the specified response topic and waits up to the configured timeout to receive a response message. If no response is received in time, an error is thrown or optionally reported if 'Continue on Fail' is enabled. The node supports inclusion of specified input fields in the payload to the MQTT broker.
Examples
Example 1: Retrieve 'href' attribute from a button element via MQTT and wait for a response
Set Topic to 'playwright/element/get_attribute', Wait For Response to true, Response Topic to 'RES_playwright/element/get_attribute', Target to 'css=button.submit', Attribute to 'href', Timeout to 30 seconds.