Playwright Test Generator for Openclaw

An AI-driven code generation engine that transforms natural language, HTML, or live URLs into production-ready Playwright test suites.

shenghoo123-png
v1.1.0
Apr 7, 2026
1
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install playwright-test-generator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install playwright-test-generator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Playwright Test Generator?

The Playwright Test Generator is a sophisticated AI agent skill designed for modern QA engineers and developers who need to accelerate their automation workflows. By leveraging advanced natural language processing and HTML analysis, this entry in the Openclaw Skills ecosystem can automatically construct complex Page Object Models (POM), standard test scripts, and parameterized data-driven tests.

Whether you are starting from a plain English description of a user journey or analyzing a complex live web application via its URL, this skill ensures robust selector extraction and framework-specific code generation. It supports major ecosystems including Python (pytest-playwright) and JavaScript/TypeScript (Jest and Native Playwright), ensuring that the generated code fits seamlessly into your existing CI/CD pipelines.

Playwright Test Generator Use Cases

  • Converting manual test cases written in plain English into executable automation scripts.
  • Rapidly building Page Object Models by analyzing live URLs or local HTML files.
  • Generating robust CSS and XPath locators based on a11y-first principles and data-testid attributes.
  • Creating data-driven test suites that require parameterized inputs for high-coverage regression testing.

How Playwright Test Generator Works

  1. Parsing: The skill analyzes natural language input to identify structured test steps like clicks, fills, and assertions.
  2. Extraction: If a URL or HTML snippet is provided, the engine crawls the DOM to extract high-priority locators using a tiered strategy.
  3. Template Selection: Based on the user's preferred framework (e.g., pytest or Jest) and code style (POM vs. Standard), the appropriate logic template is selected.
  4. Rendering: The parsed steps and extracted locators are injected into the template to generate clean, formatted code.
  5. Deployment: The final code is outputted to the specified directory, ready for immediate execution.

Playwright Test Generator Setup

To integrate this capability into your workflow, ensure you have the Openclaw Skills environment configured. You can use the CLI to generate tests immediately:

# Install the playwright-test-generator skill
openclaw install playwright-test-generator

# Generate a standard test from a natural language prompt
playwright-test-generator generate --input "Login to the app" --framework pytest

Playwright Test Generator Data Schema & Taxonomy

The skill organizes its output and internal logic based on a structured metadata taxonomy to ensure compatibility across different Openclaw Skills.

Component Format Description
Test Steps JSON Defines actions (click, fill), targets, and values.
Locators JSON/Dictionary A map of element names to prioritized selectors (data-testid, role, etc.).
Templates EJS Framework-specific templates for rendering Python or TypeScript code.
Metadata YAML Contains skill definitions, framework support, and versioning information.

Playwright Test Generator Advanced Features

  • Multi-Framework Support: Seamlessly switch between Python (pytest) and JS/TS (Jest/Native) environments.
  • A11y-First Locator Strategy: Prioritizes accessible roles and names to ensure tests are resilient and support accessibility standards.
  • Interactive Wizard Mode: A guided CLI experience for step-by-step test construction for complex scenarios.
  • API Integration: Can be called programmatically by other AI agents or skills within a broader automation pipeline.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*