Actions63
- 1. Manager Actions
- 2. Mouse Actions
- 3. Keyboard Actions
- 4. Browser Control Actions
- 5. Element Actions
- 6. Image Actions
- 7. Others Actions
- 8. Email Actions
- 9. Developer Actions
- 10. General Debug Actions
5. Element → get_text
AI-generatedSummary
Publishes a Playwright request to retrieve the text content of a specific web page element via an MQTT topic and waits for the response.
Inputs
- topic (required) — MQTT topic used to publish the request. Example: 'playwright/mouse/click'.
- element_get_text__remote_port (required) — CDP port to route the command to the correct session on the remote machine. Defaults to a value from the previous node's output (e.g., 8888). Use '127001' for a local session.
- element_get_text__target — CSS selector identifying the element to interact with (e.g., 'css=button').
- element_get_text__xpath — XPath expression to identify the element if a CSS selector is insufficient (e.g., '//button[@id="submit"]').
- element_get_text__timeout_sec — Maximum time to wait for the element to be found before failing (in seconds).
- qos — MQTT Quality of Service level (0, 1, or 2). Defaults to 1.
- includeInputItems — Whether to attach data from the previous node into the request payload.
- includeInputItemsFields — Select specific fields from the previous node to include when 'Include Input Items' is enabled.
- waitForResponse — If true, the node waits for the MQTT response before returning output (synchronous flow). If false, it publishes and continues immediately (fire-and-forget).
- responseTimeoutSec — Maximum time to wait for the response when 'Wait For Response' is enabled (in seconds).
- delayNextStepMs — Delay in milliseconds before proceeding to the next node. Runs after response (if waiting) or after publish (if fire-and-forget). Defaults to 'rand(200,1000)'.
Output shape
The text content of the specified element, returned in an array of items.
The output shape depends on the 'Wait For Response' setting: true returns the result array synchronously; false returns the input items (or an empty array if 'Include Input Items' is false).
Examples
Example 1: Get text from a submit button using a CSS selector synchronously.
Set 'Wait For Response' to true, 'element_get_text__target' to 'css=button.submit', and 'element_get_text__remote_port' to the session port.
Example 2: Retrieve text from an element identified by XPath asynchronously.
Set 'Wait For Response' to false, 'element_get_text__xpath' to '//input[@id="search"]', and 'qos' to 0.
Example 3: Chain multiple actions on the same page session.
Pass the 'remote_debugging_port' from the previous node into the 'Remote Port' parameter of this node.
