Remote Desktop Action icon

Remote Desktop Action

Execute or queue actions on a remote desktop

playwright.evaluate

AI-generated

Summary

Evaluates a JavaScript expression in the remote desktop session via Playwright, optionally scoped to a selector, with immediate or queued execution.

Inputs

  • sessionId (required) — ID of the remote desktop session from a Session node.
  • expression — JavaScript expression to evaluate in the page context.
  • selector — CSS selector; the expression is evaluated within the matched element's context.
  • mode (required) — Whether to run the action immediately or queue it for batch execution.

Output shape

depends on mode

When mode is 'run', the node returns the result of the Playwright evaluate call. When mode is 'build', it returns an object containing the session ID, the updated list of queued actions, and the queued count: { session_id: string, queued_actions: Array<{action:string, params:object}>, queued_count: number }.

Examples

Example 1: Immediately evaluate expression and get result

Set Mode to Run, provide Session ID, and an Expression such as 'document.title'.

Example 2: Queue expression for later batch execution

Set Mode to Build, provide Session ID, Expression, and optionally Selector.

Discussion