A VS Code extension that provides a graphical interface for playwright-generator — configure your LLM, generate Playwright test code from natural language, and run your tests, all without leaving the editor.
Features
Configuration
Load and save your .env file directly from the panel
Switch between AI models (Claude, Azure OpenAI, ChatGPT, Local LLM) with model-specific fields shown/hidden automatically
Configure browser, headless mode, video recording, timeout, and retries
Generation
Searchable dropdown of all test case IDs scanned from your tests/ folder
Auto-updates when test case files change
One-click generation via npx playwright-generator generate --tc <ID>
Run
Searchable dropdown of all tags scanned from your generated/ folder
Auto-updates when generated test files change
Buttons to run all tests, run by tag, run with UI (headed), debug, and open the HTML report
Requirements
playwright-generator installed and initialised in your workspace (npx playwright-generator init)
A .env file in your workspace root
Node.js 16+
Getting Started
Install the extension from the VS Code Marketplace
Open a workspace that has been initialised with npx playwright-generator init
Click the Playwright Generator icon in the Activity Bar
Configure your AI model and credentials in the Configuration section
Select a test case ID and click Generate
Run your tests from the Run section
Configuration
Field
Description
AI Model
claude, azure-openai, chatgpt, or local
Claude API Key
Required when using Claude (sk-ant-...)
Azure OpenAI API Key / Endpoint
Required when using Azure OpenAI
ChatGPT API Key / Model
Required when using ChatGPT
Local LLM URL / Model
Required when using a local Ollama model
Browser
chromium, firefox, or webkit
Headless
Run browser in headless mode
Video
retain-on-failure, on, off, on-first-retry
Timeout
Test timeout in milliseconds
Retries
Number of retries on failure
All changes are saved directly to the .env file in your workspace root.