npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@warnyin/n8n-nodes-code-playwright

v0.7.0

Published

n8n community node for browser automation using Playwright

Readme

@warnyin/n8n-nodes-code-playwright

npm version npm downloads License: MIT

n8n community node for browser automation using Playwright.

Package: @warnyin/n8n-nodes-code-playwright

Table of Contents

About

This n8n community node provides browser automation capabilities using Playwright. It allows you to automate web browsers (Chromium, Firefox, WebKit) directly within your n8n workflows.

Key Features

  • Multi-browser support: Chromium, Firefox, and WebKit
  • Headless or headful mode: Run browsers visibly or in the background
  • Screenshot capture: Take full-page or element screenshots
  • Form automation: Fill forms and click elements
  • Text extraction: Get text content from web pages
  • JavaScript evaluation: Execute custom JS code in page context
  • Wait for elements: Wait for selectors before proceeding

Installation

Option 1: Community Nodes (Recommended)

  1. Open n8n and go to Settings → Community Nodes
  2. Click Install
  3. Enter: @warnyin/n8n-nodes-code-playwright
  4. Accept the risks and install

Option 2: Manual Installation

cd ~/.n8n/nodes
npm install @warnyin/n8n-nodes-code-playwright
# Restart n8n

Option 3: Docker Installation

For Docker environments, ensure your n8n container has Chrome installed:

# Add this to your n8n Dockerfile
FROM node:18-alpine
RUN apk add --no-cache chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
    PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

Or use the official n8n image with Chrome:

FROM n8nio/n8n
USER root
RUN apt-get update && apt-get install -y \
    google-chrome-stable \
    && rm -rf /var/lib/apt/lists/*
USER node

Then install the node:

docker exec -it <n8n-container> npm install @warnyin/n8n-nodes-code-playwright

Option 4: Local Development & Linking

# Clone, install, and build
git clone https://github.com/warnyin/n8n-nodes-code-playwright.git
cd n8n-nodes-code-playwright
pnpm install
pnpm build

# Link to n8n
npm link
cd ~/.n8n
npm link @warnyin/n8n-nodes-code-playwright
# Restart n8n

Usage

Basic Parameters

| Parameter | Description | |-----------|-------------| | Operation | The browser action to perform | | URL | The webpage URL to navigate to | | Browser | Browser engine: Chromium, Firefox, or WebKit | | Browser Options | Headless mode, slow motion settings |

Operations

Navigate

Navigate to a URL and return the page content.

Take Screenshot

Capture a screenshot of the webpage.

  • Full Page: Capture entire scrollable page
  • Property Name: Binary property name for the screenshot

Get Text

Extract text content from an element using CSS selector.

Click Element

Click on an element specified by CSS selector.

Fill Form

Fill a form field with a specified value.

Wait for Selector

Wait for an element to appear on the page.

Examples

Example 1: Take a Screenshot

{
  "operation": "takeScreenshot",
  "url": "https://example.com",
  "browser": "chromium",
  "screenshotOptions": {
    "fullPage": true
  },
  "dataPropertyName": "screenshot"
}

Example 2: Fill and Submit a Form

{
  "operation": "fillForm",
  "url": "https://example.com/login",
  "selector": "#username",
  "value": "myuser",
  "browser": "chromium"
}

Example 3: Extract Text

{
  "operation": "getText",
  "url": "https://example.com",
  "selector": "h1",
  "browser": "chromium"
}

Notes & Limitations

  • Browser Installation: Browsers are automatically installed during package installation
  • Docker Support: For Linux/Docker environments, the node will automatically fallback to system Chrome if Playwright Chromium fails
  • Resource Usage: Running browsers consumes significant memory
  • Headless Recommended: Use headless mode in production environments
  • Timeout: Default timeout for operations is 30 seconds
  • Network: Requires network access for navigation

Troubleshooting

Browser not found error

If you encounter "Browser not found" errors, try running the setup script manually:

cd ~/.n8n/nodes/node_modules/@warnyin/n8n-nodes-code-playwright
npm run setup

Linux/Docker GTK/GLib errors

If you see errors like Error relocating chrome: g_object_notify: symbol not found, this means Playwright Chromium requires system dependencies. The node will automatically:

  1. Try to detect and use system Chrome/Chromium
  2. Fall back to Playwright Chromium with alternative arguments
  3. If all fails, you need to install Chrome in your Docker container:
# For Debian/Ubuntu based images
apt-get update && apt-get install -y google-chrome-stable

# For Alpine images  
apk add --no-cache chromium

Permission issues on Linux

On Linux systems, you may need to install additional dependencies:

npx playwright install-deps

Memory issues

If n8n crashes due to memory issues when using Playwright:

  1. Ensure headless: true is enabled
  2. Close browser contexts properly
  3. Consider increasing n8n's memory allocation

Development

# Install dependencies
pnpm install

# Build
pnpm build

# Watch mode
pnpm dev

# Setup browsers manually
pnpm setup

# Lint code
pnpm lint

# Fix lint issues
pnpm lintfix

# Format code
pnpm format

Changelog

See CHANGELOG.md for release notes.

License

MIT License — see LICENSE.md.

Author

warnyin - GitHub

References


Made with ❤️ for the n8n community