Remote Desktop Action icon

Remote Desktop Action

Execute or queue actions on a remote desktop

playwright.locator_count

AI-generated

Summary

Counts how many elements match a given selector in a remote desktop session using Playwright.

Inputs

  • Session ID (required) — ID of the remote desktop session, typically supplied by a Session node.
  • Selector — CSS selector whose matching elements will be counted. If omitted, the action may return an error or a default count depending on the remote backend.
  • Mode (required) — Determines whether the action is executed immediately or queued for later batch execution. Options: Run (default) or Build.

Output shape

object

When Mode is Run, returns the raw response from the remote desktop API for the playwright.locator_count action, which includes the count of matched elements. When Mode is Build, returns an object containing the session ID and an updated queued_actions array with the locator_count action appended, plus a queued_count reflecting the total number of queued actions.

Examples

Example 1: Immediate execution

Set Mode to Run, provide a valid Session ID, and optionally specify a Selector (e.g. 'button.submit'). The node will call the remote desktop API to evaluate the selector and return the count.

Example 2: Batch queuing

Set Mode to Build, provide a Session ID, and optionally a Selector. The node appends the locator_count action to the input's queued_actions array, allowing a later node to send the whole batch to the remote desktop.

Discussion