webwright for Openclaw

A browser automation skill that delegates tasks to the Microsoft webwright CLI, writing and executing Playwright scripts to drive a real Chromium browser.

hansraj316
v1.0.1
Jun 7, 2026
1
575
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install webwright

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 webwright 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 webwright?

The webwright skill acts as a code-as-action agent for advanced web navigation. Instead of relying on fragile step-by-step click commands, webwright utilizes an LLM to dynamically author and run Playwright scripts that drive a live Chromium browser. This approach offers unparalleled robustness and repeatability for traversing complex web applications.

By leveraging this capability inside Openclaw Skills, developers can execute deep-horizon browsing tasks directly from their AI agent workspaces. It is designed specifically for complex interactions where session state, multi-page logic, and repeatable navigation pathways are required, ensuring high reliability by treating automated actions as concrete code execution.

webwright Use Cases

  • Automating multi-step web flows such as logins, multi-page web forms, and checkout or checkout wizard sequences.
  • Carrying session state across long-horizon navigation spanning multiple pages and domains.
  • Creating reusable Playwright scripts as concrete, repeatable artifacts for future browser tasks.
  • Scoping and testing complex UI workflows on local or remote staging environments safely.

How webwright Works

  1. Parse the given input parameters: user task, entry URL, model config, and workspace output directory.
  2. Verify that the webwright CLI, target browser (Chromium), and necessary API tokens are initialized.
  3. Spawn the webwright CLI execution process with the designated model (OpenAI, Claude, or OpenRouter).
  4. Synthesize a task-specific Playwright Python script dynamically based on the target website's live DOM.
  5. Execute the generated script in a Chromium browser instance to complete the browser actions.
  6. Capture screenshots, state trajectories, and run logs, archiving the final script inside the designated workspace output directory.

webwright Setup

Enable the skill in your configuration first as it is opt-in by default:

openclaw config set skills.entries.webwright.enabled true

Run the built-in diagnostic utility to verify your execution environment:

webwright doctor

Ensure that you satisfy all preflight prerequisites before trigger execution:

  1. Verify webwright is present on your system PATH.
  2. Install Chromium for Playwright via CLI:
    playwright install chromium
    
  3. Export your chosen LLM provider API key to the active shell: OPENAI_API_KEY, ANTHROPIC_API_KEY, or OPENROUTER_API_KEY.
  4. Ensure the system python3 matches your active virtual environment context where webwright is installed so Playwright scripts can find Chromium.

webwright Data Schema & Taxonomy

Webwright generates a structured set of files inside the specified workspace directory (always pass -o inside your current workspace directory). The resulting directory layout organizes runtime information and artifacts:

Path / File Type Description
final_script.py Python Script The final executable Playwright script synthesized by the model to perform the task.
plan.md Markdown The model-generated execution plan and task breakdown.
final_runs/run_<id>/ Directory Contains the step execution logs, debugging data, and visual states.
final_runs/run_<id>/*.png Image Interactive screenshots captured during each transition or execution phase.

webwright Advanced Features

  • Config Stacking: Combine base configuration files with inline agent adjustments such as step limits using -c base.yaml -c agent.step_limit=20.
  • Environment Variable Injection: Securely run authentication flows by passing credentials as environment variable names (e.g., $SITE_USER) inside the task execution string rather than hardcoding actual secrets.
  • Workspace Isolation: Constrain all outputs, visual assets, plans, and executing scripts within workspace-local subdirectories to safeguard system directories.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*