- Notifications
You must be signed in to change notification settings - Fork5
Command-line utility to generate LLM-based Playwright tests
License
NotificationsYou must be signed in to change notification settings
vladikoff/playwright-ai
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Command-line utility to generate LLM-basedPlaywright tests
Supported models:
- Anthropic's Claude - configure API key with
ANTHROPIC_API_KEY
. - OpenAI's GPT3 and GPT4 - configure API key with
OPENAI_API_KEY
.
- Make sure you have the most basic Playwright installation with
npm init playwright@latest
. Seehttps://playwright.dev/docs/intro#installing-playwright for details. - Install the CLI:
npm -g playwright-ai
- Obtrain the API key for the LLM model of your choice:Anthropic orOpenAI.
- Execute the CLI from project directory:
playwright-ai --endpoint=https://example.com --model=claude --tests=1
- After the CLI is done, it will generate the tests into the Playwright test directory. As the tests generate, the CLI will have both passing and failing tests. The failing tests will have to be manually fixed by the user of the tool.
This option is required.
The endpoint option specifies the API endpoint to call.playwright-ai
will browse to this endpoint and process it for generating the tests.
Default:gpt-4
.
The LLM model to use to generate the tests.Available options:gpt-3
,gpt-4
,claude
.
Default:1
.
Number of LLM-based tests to generate.
Displays CLI command help.
Shows CLI version.
See theCHANGELOG.md.
- Support for other models
- More complex test cases
About
Command-line utility to generate LLM-based Playwright tests
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published