360 Secure SkillHub
360 安全技能中心

Playwright WS

该 Skill 通过远程 Playwright WebSocket 服务器执行浏览器自动化,提供网页截图、PDF 导出和远程 Playwright 测试运行三个脚本,需自行将 PLAYWRIGHT_WS 指向可信服务器;所配置的服务器可观察请求的 URL、页面内容与截图。

first-it-consulting
first-it-consulting
热度 70.77
最近更新 2026-05-11 17:29:40
分类:自动化依赖:代码执行 / 联网浏览搜索 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流 / 文件转换

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add playwright-ws
Metadata
name
playwright-ws
description
Browser automation via remote Playwright WebSocket server for screenshots, PDFs and testing.
metadata
{"clawdbot":{"emoji":"🎭","requires":{"bins":["node"],"env":["PLAYWRIGHT_WS"]},"primaryEnv":"PLAYWRIGHT_WS"}}

Playwright Skill

Remote browser automation via Playwright WebSocket server. No local browser installation required.

Privacy notice: The configured WebSocket server can observe all requested URLs, page contents, screenshots, and test interactions. Use only a Playwright server you control or fully trust, and avoid routing sensitive sites through untrusted infrastructure.

Use Cases

Task Script Description
Screenshot scripts/screenshot.js Capture screenshots of web pages
PDF scripts/pdf-export.js Generate PDFs from URLs
Test scripts/test-runner.js Run Playwright tests remotely

Installation

cd playwright-skill
npm install
export PLAYWRIGHT_WS=ws://your-server:3000

Quick Start

# Screenshot
node scripts/screenshot.js https://example.com screenshot.png --full-page

# PDF
node scripts/pdf-export.js https://example.com page.pdf

Configuration

Set PLAYWRIGHT_WS environment variable to your Playwright WebSocket URL:

export PLAYWRIGHT_WS=ws://your-playwright-server:3000

Scripts

  • screenshot.js - Take screenshots with options
  • pdf-export.js - Generate PDFs
  • test-runner.js - Run remote tests

References

  • references/selectors.md - Selector strategies
  • references/api-reference.md - API documentation