GitXplorerGitXplorer
v

playwright-ai

public
44 stars
5 forks
0 issues

Commits

List of commits on branch main.
Verified
39d791c4a5a54e2b86a33817559411e6d7bc461f

Add npm badge

vvladikoff committed a year ago
Verified
a04139d6454bcb5f21b8158a5d2423f631aede05

1.1.0

vvladikoff committed a year ago
Verified
684d49750b1aeb327900a52ada7339fb1c11c3d3

v1.1.0 updates

vvladikoff committed a year ago
Verified
6830c34174cfa133c2f1bb5a6de426e8d7653b87

1.0.1

vvladikoff committed a year ago
Verified
72a2b2a4dfae1cfbe34682e566f8f56b97376cdd

Disable test for now

vvladikoff committed a year ago
Verified
7bd801fb8e769bacaaab5077fb6597b760d9cc00

Package

vvladikoff committed a year ago

README

The README file for this repository.

playwright-ai

Command-line utility to generate LLM-based Playwright tests

⚠️ Warning this tool is experimental and is still under development.

playwright-ai logo

Usage

Supported models:

  • Anthropic's Claude - configure API key with ANTHROPIC_API_KEY.
  • OpenAI's GPT3 and GPT4 - configure API key with OPENAI_API_KEY.

Quick start

npm -g playwright-ai
  • Obtrain the API key for the LLM model of your choice: Anthropic or OpenAI.
  • 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.

playwright-ai demo

Core Options

--endpoint (-e) :: String

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.

--model (-m) :: String

Default: gpt-4.

The LLM model to use to generate the tests. Available options: gpt-3, gpt-4, claude.

--tests (-t) :: Number

Default: 1.

Number of LLM-based tests to generate.

CLI Options

--help

Displays CLI command help.

---version

Shows CLI version.

Release History

See the CHANGELOG.md.

TODO

  • Support for other models
  • More complex test cases

License

MIT