Remote Playwright icon

Remote Playwright

Interact with Remote Playwright Instance

Overview

The node "Remote Playwright" allows interaction with a remote Playwright instance to automate browser actions. Specifically, the ExtractText operation under the Instance resource extracts text content from a webpage element identified by a CSS selector. This is useful for web scraping, automated testing, or data extraction tasks where you need to programmatically retrieve visible text from a page.

Practical examples include:

  • Extracting product descriptions or prices from an e-commerce site.
  • Retrieving status messages or notifications from a web application.
  • Capturing dynamic content after page interactions for further processing.

Properties

Name Meaning
Instance ID The identifier of the remote Playwright instance to use for this action.
Close Browser on error Whether to close the browser if an error occurs during the action (true/false).
Selector The CSS selector specifying the element from which to extract text.

Output

The node outputs JSON data containing the extracted text from the specified selector. The structure typically includes a field holding the textual content retrieved from the targeted element on the webpage.

If the node supports binary data output, it would represent any non-textual content fetched, but in this case, the focus is on textual extraction only.

Dependencies

  • Requires access to a remote Playwright service endpoint configured via credentials that provide the base URL and authentication.
  • Needs a valid Playwright instance running remotely, identified by the provided Instance ID.
  • Proper network connectivity between n8n and the remote Playwright service.

Troubleshooting

  • Common issues:

    • Incorrect or missing Instance ID can cause failure to connect to the Playwright instance.
    • Invalid or empty CSS selector will result in no text being extracted or errors.
    • Network or authentication problems with the remote Playwright API may prevent execution.
  • Error messages and resolutions:

    • "Instance not found" — Verify the Instance ID is correct and the Playwright instance is active.
    • "Selector not found" — Check the CSS selector syntax and ensure the element exists on the page.
    • "Connection refused or timeout" — Confirm the remote Playwright service URL and credentials are properly set and accessible.

Links and References

Discussion