GREAT LOTUS icon

GREAT LOTUS

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

5. Element → wait_element

AI-generated

Summary

Waits for a page element to reach a selected state, such as present, visible, editable, or the negation of one of those states. Use a selector or XPath and set the maximum wait time; the node sends the request over MQTT to the session identified by the remote port.

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; defaults to the incoming item's remote_debugging_port.
  • Target — Element selector, such as css=button. Defaults to an empty string.
  • XPath — XPath selector, such as //button. Defaults to an empty string.
  • Wait Type — State to wait for: present, visible, editable, not present, not visible, or not editable. Defaults to present.
  • Timeout (sec) — Maximum time to wait before an error; defaults to 30 seconds.
  • QoS — MQTT delivery quality level: 0, 1, or 2; defaults to 1.
  • Include Input Items — Whether to include selected fields from incoming items in payload.inputItems; defaults to false.
  • Wait For Response — Whether to wait for the MQTT response before returning output; defaults to false. Response Timeout (sec) applies when enabled and defaults to 60 seconds.
  • Delay Next Step (ms) — Delay before continuing after publishing, or after receiving the response when waiting for one. Defaults to rand(200,1000).

Output shape

A single item per MQTT response when Wait For Response is enabled; otherwise the node publishes the request and continues without waiting for a response.

Selected incoming fields can be attached as payload.inputItems. The provided source pack omits the execute implementation body, so response field details and the exact output envelope are not shown.

Examples

Example 1: Wait until a submit button is visible before continuing.

Set Target to css=button.submit, Wait Type to visible, and Timeout (sec) to 30.

Example 2: Wait for an element to disappear.

Set Target to a selector, such as css=.loading, and Wait Type to not visible.

Links

Discussion