跳到正文
TakoAPI
返回技能列表

playwright-testing

由 kjaylee 提供

Web & Frontend Development
—暂无评分
你的评分

简介

Test web applications and games using Playwright on MiniPC.

描述

该技能的功能

Runs Playwright browser automation on a MiniPC node using headless Chromium. Handles web app and game QA, screenshot capture, DOM inspection, and console log collection. Executes via nodes.run or browser.proxy rather than the local machine.

Running tests on a dedicated MiniPC node keeps browser execution off the development machine and avoids display dependency issues.

何时使用

  • Verifying a game loads and renders its canvas correctly
  • Capturing screenshots of a web app at specific states
  • Checking for JavaScript console errors during page interaction
  • Automating click sequences to test UI flows
  • Confirming score or state changes after user input

示例工作流

输入

User asks: test that the game at localhost:9877 loads and the canvas is visible

智能体
  1. 1

    Navigate to http://localhost:9877/game.html on MiniPC via browser.proxy or nodes.run

  2. 2

    Wait for networkidle state to ensure JS has finished executing

  3. 3

    Locate the canvas element and assert it is visible

  4. 4

    Click the canvas to trigger game interaction

  5. 5

    Take a screenshot and capture any console errors

输出

Screenshot saved to /tmp/game-test.png confirming canvas renders; console error list returned

安装

clawhub install kjaylee/playwright-testing

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接