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
9. Developer → count_element
AI-generatedSummary
Counts elements matching a selector or XPath through a Great Lotus developer action sent over MQTT. Use the target session’s remote port and provide a selector, XPath, or both; optionally wait for the response and include selected fields from incoming items.
Inputs
- Topic (required) — MQTT topic used to publish the request.
- Remote Port (required) — CDP port used to route the request to the intended client session; supports the virtual local session port 127001.
- QoS — MQTT delivery quality level: 0 (at most once), 1 (at least once), or 2 (exactly once). Defaults to 1.
- Include Input Items — When enabled, adds selected fields from incoming items to payload.inputItems. Defaults to false.
- Input Items Fields — Comma-separated field paths to copy from incoming items when Include Input Items is enabled; supports nested and indexed paths.
- Wait For Response — When enabled, waits for the MQTT response before returning output. Defaults to false.
- Response Timeout (sec) — Maximum response wait in seconds when waiting is enabled. Defaults to 60.
- Delay Next Step (ms) — Delay before continuing; runs after the response when waiting, or after publishing otherwise. Defaults to rand(200,1000).
- Target — Element selector, such as css=button. Defaults to empty.
- XPath — XPath expression for identifying elements, such as //button. Defaults to empty.
Output shape
An MQTT action response when waiting is enabled; otherwise no response body is awaited.
The action counts elements matching the supplied selector or XPath. The source-pack excerpt omits implementation bodies, so the exact response fields and behavior when neither locator is supplied are not shown.
