playwright-node-api-container

Capture authenticated web page screenshots using Node.js Playwright in containers.

2|Updated May 10, 2026
One-click install
npx skills add https://github.com/freedomw1987/tree_monstor --skill playwright-node-api-container
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-node-api-container
Source: https://github.com/freedomw1987/tree_monstor/tree/main/skills/testing/playwright-node-api-container
Command: npx skills add https://github.com/freedomw1987/tree_monstor --skill playwright-node-api-container

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CLI Playwright screenshot tools can only capture public pages and cannot execute login flows to access authenticated content. Additionally, running Playwright Node API directly in container or virtual machine environments often fails with MODULE_NOT_FOUND errors and requires special Chromium configuration to avoid runtime crashes.

Core Features & Use Cases

  • Authenticated Page Automation: Execute full login flows to access and capture screenshots of post-login pages like dashboards and member portals that are inaccessible to CLI tools.
  • Container-Optimized Configuration: Pre-configured Chromium launch arguments (--no-sandbox, --disable-dev-shm-usage) to resolve common container/VM runtime issues.
  • Error Tracking & Troubleshooting: Built-in console error capture and guidance for resolving common setup issues like NODE_PATH configuration and navigation timeouts.
  • Use Case: Verify the functionality of a session-required admin dashboard running in a Docker container by automating login, navigating to the dashboard, and capturing a full-page screenshot for review.

Quick Start

Use the playwright-node-api-container skill to capture a full-page screenshot of the post-login dashboard at https://your-app.com/dashboard running in a container environment and save it to /tmp/dashboard.png.

Frequently Asked Questions about playwright-node-api-container

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture screenshots of authenticated web pages requiring login flows in a Docker container?

Capturing screenshots of authenticated web pages in a container requires the Node.js Playwright API to automate login flows and access session-dependent content. This enables post-login dashboard verification and member page validation where CLI screenshot tools fail.

Why does Playwright fail with MODULE_NOT_FOUND errors when running automated web testing in a VM?

Playwright fails with MODULE_NOT_FOUND errors in VM environments due to incorrect Node.js module resolution paths. Setting the NODE_PATH environment variable correctly resolves module dependencies, enabling proper execution of automated testing scripts in container or virtual machine environments.

What Chromium launch arguments are needed to run Playwright without crashing in a container?

Running Playwright in a container requires specific Chromium launch arguments including --no-sandbox and --disable-dev-shm-usage. These container-optimized configurations prevent common runtime crashes and sandbox-related failures in virtual machine and Docker environments.

Can I use the Playwright Node.js API to verify session-required admin dashboards running in containers?

Yes, the Playwright Node.js API can verify session-required admin dashboards running in containers by automating login, navigating to the dashboard, and capturing a full-page screenshot. This validates functionality of authenticated content inaccessible to standard CLI tools.

How do I troubleshoot navigation timeouts and capture console errors during Playwright automated testing?

Troubleshooting navigation timeouts during Playwright automated testing involves built-in console error capture and logging mechanisms. These features track test result validation errors and provide guidance for resolving common setup issues in container-based web automation workflows.