Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nodejs/docs/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

## Version 1.56

<LiteYouTube id="_AifxZGxwuk" title="Playwright 1.56 - Introducing Playwright Agents" />
<LiteYouTube id="_AifxZGxwuk" title="Playwright 1.56 - Introducing Playwright Test Agents" />

### Playwright Agents
### Playwright Test Agents

Introducing Playwright Agents, three custom agent definitions designed to guide LLMs through the core process of building a Playwright test:
Introducing Playwright Test Agents, three custom agent definitions designed to guide LLMs through the core process of building a Playwright test:
* **🎭 planner** explores the app and produces a Markdown test plan
* **🎭 generator** transforms the Markdown plan into the Playwright Test files
* **🎭 healer** executes the test suite and automatically repairs failing tests
Expand All @@ -32,7 +32,7 @@ npx playwright init-agents --loop=claude
npx playwright init-agents --loop=opencode
```

[Learn more about Playwright Agents](./test-agents.mdx)
[Learn more about Playwright Test Agents](./test-agents.mdx)

### New APIs
- New methods [page.consoleMessages()](/api/class-page.mdx#page-console-messages) and [page.pageErrors()](/api/class-page.mdx#page-page-errors) for retrieving the most recent console messages from the page
Expand Down
13 changes: 9 additions & 4 deletions nodejs/docs/test-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import HTMLCard from '@site/src/components/HTMLCard';

import LiteYouTube from '@site/src/components/LiteYouTube';

# Playwright Agents
# Playwright Test Agents

## Introduction

Playwright comes with three Playwright Agents out of the box: **🎭 planner**, **🎭 generator** and **🎭 healer**.
Playwright comes with three Playwright Test Agents out of the box: **🎭 planner**, **🎭 generator** and **🎭 healer**.

These agents can be used independently, sequentially, or as the chained calls in the agentic loop. Using them sequentially will produce test coverage for your product.
* **🎭 planner** explores the app and produces a Markdown test plan
* **🎭 generator** transforms the Markdown plan into the Playwright Test files
* **🎭 healer** executes the test suite and automatically repairs failing tests

<LiteYouTube id="_AifxZGxwuk" title="Playwright 1.56 - Introducing Playwright Agents" />
<LiteYouTube id="_AifxZGxwuk" title="Playwright 1.56 - Introducing Playwright Test Agents" />

### Getting Started

Start with adding Playwright Agent definitions to your project using the `init-agents` command. These definitions should be regenerated whenever Playwright is updated to pick up new tools and instructions.
Start with adding Playwright Test Agent definitions to your project using the `init-agents` command. These definitions should be regenerated whenever Playwright is updated to pick up new tools and instructions.

<Tabs
groupId="bash-flavor"
Expand Down Expand Up @@ -57,6 +57,11 @@ npx playwright init-agents --loop=opencode
</TabItem>
</Tabs>

:::note

VS Code v1.105 (currently on the [VS Code Insiders channel](https://code.visualstudio.com/insiders/)) is needed for the agentic experience in VS Code. It will become stable shortly, we are a bit ahead of the curve with this functionality!
:::

Once the agents have been generated, you can use your AI tool of choice to command these agents to build Playwright Tests.

## 🎭 Planner
Expand Down
Loading