MQTT General

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

Browser Control → SwitchTab

AI-generated

Summary

Switches the active browser tab to the tab at the specified zero-based index via an MQTT message.

Inputs

  • Topic (required) — The MQTT topic to publish the switch tab action, for example 'playwright/browser/switch_tab'.
  • QoS — Quality of Service level for the MQTT message; 0, 1, or 2.
  • Include Input Items — Optionally include selected fields from previous input items in the payload.
  • Include Input Items Fields — Specify which fields from previous input to include if 'Include Input Items' is enabled.
  • Wait For Response — Whether the node should wait for a response message after publishing the switch tab command.
  • Response Topic (required) — MQTT topic to subscribe to for receiving the response if 'Wait For Response' is enabled; defaults to 'RES_' prepended to the publish topic.
  • Response Timeout (ms) — Maximum time in milliseconds to wait for a response message.
  • Parse Response As JSON — Parse the incoming response payload as JSON if possible.
  • Index — Zero-based index of the browser tab to switch to.

Output shape

a list of items mirroring input items, each augmented with an mqtt property detailing the published topic, action key, and payload inputs; includes response data if a reply was awaited and received.

If 'Wait For Response' is enabled, the node subscribes to the specified response topic and waits up to the configured timeout for a reply. Response payloads are optionally parsed as JSON. On timeout or error, the node throws unless 'Continue On Fail' is enabled, in which case error details are returned in the output items.

Examples

Example 1: Switch the active browser tab to the third tab (index 2) by publishing to topic 'playwright/browser_control'

Set Topic to 'playwright/browser_control'. Set Index to 2. QoS defaults to 1. Disable 'Wait For Response' unless verification is needed.

Links

Discussion