Remote Playwright icon

Remote Playwright

Interact with Remote Playwright Instance

Overview

The node interacts with a remote Playwright instance to wait for a specific element on a web page to appear or become available. This is useful in automation workflows where subsequent actions depend on the presence of certain elements, such as buttons, input fields, or dynamic content loaded asynchronously.

Common scenarios include:

  • Waiting for a login button to appear before clicking it.
  • Pausing execution until a form field is visible before filling it.
  • Ensuring that a dynamically loaded table or text block has rendered before extracting data.

For example, you might use this node to wait for a "Submit" button selector to appear after navigating to a page, ensuring your workflow only proceeds once the page is ready for interaction.

Properties

Name Meaning
Instance ID The identifier of the remote Playwright instance to interact with.
Close Browser on error Whether to close the browser if an error occurs during the wait operation (true/false).
Selector The CSS or XPath selector of the element to wait for on the page.
Timeout Maximum time in milliseconds to wait for the element before timing out.

Output

The node outputs JSON data representing the result of the wait operation. Typically, this includes confirmation that the element was found or an error if the timeout was reached without the element appearing.

If the node supports binary data output (not indicated here), it would relate to screenshots or other page captures, but this is not evident from the provided code.

Dependencies

  • Requires a remote Playwright instance accessible via an API endpoint.
  • Needs an API key or authentication token configured in n8n credentials to connect securely to the remote Playwright service.
  • The instanceId must correspond to an active Playwright session managed externally.

Troubleshooting

  • Timeout Errors: If the element does not appear within the specified timeout, the node will error. Increase the timeout or verify the selector correctness.
  • Selector Issues: Incorrect or overly generic selectors may cause the node to wait indefinitely or fail. Use precise CSS or XPath selectors.
  • Instance ID Invalid: Ensure the provided instance ID matches an active Playwright session; otherwise, the node cannot perform actions.
  • Browser Not Closing on Error: If "Close Browser on error" is set to false, the browser may remain open after failures, potentially causing resource leaks.

Links and References

Discussion