MQTT General

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

Others → cancel_alert

AI-generated

Summary

Publish a cancel alert action message to a specified MQTT topic to dismiss an alert dialog after an optional delay.

Inputs

  • Topic (required) — The MQTT topic to which the cancel alert message is published, e.g., 'playwright/mouse/click'.
  • QoS — The MQTT Quality of Service level to use when publishing the message. Options are 0 (at most once), 1 (at least once), or 2 (exactly once). Default is 1.
  • Include Input Items — Whether to include selected fields from the input items in the payload’s inputItems property.
  • Include Input Items Fields — Specifies which fields to include from the input items if Include Input Items is enabled. Supports drag-and-drop field selection.
  • Wait For Response — Whether the node should wait for a reply message on a response topic before returning output.
  • Response Topic — The MQTT topic on which to listen for the response message if Wait For Response is enabled. Defaults to prefixing the main Topic with 'RES_'.
  • Response Timeout (ms) — Maximum time in milliseconds to wait for a response message if Wait For Response is enabled. Default is 10000 ms.
  • Parse Response As JSON — Indicates whether to parse the response message payload as JSON when waiting for a response.
  • Show (sec) — Optional delay in seconds before automatically dismissing the alert, useful to visibly observe the alert before cancellation.

Output shape

A list of items representing the input data augmented with MQTT action details and optionally, the response payload if waited for.

If 'Wait For Response' is enabled, the output will include the response message data received on the response topic. Error handling is supported with optional continuation on failure.

Examples

Example 1: Cancel an alert promptly

Set Topic to the desired MQTT topic, e.g., 'playwright/alert', set 'Show (sec)' to 0 or omit it, and execute to send a cancel alert message.

Example 2: Cancel an alert with a short visible delay

Set Topic, enable 'Show (sec)' to 0.5 to delay dismissal by half a second allowing observation of the alert before closing.

Links

Discussion