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
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,15 @@ await BrowserContext.GrantPermissionsAsync(permissions, options);
* `'clipboard-write'`
* `'geolocation'`
* `'gyroscope'`
* `'local-fonts'`
* `'local-network-access'`
* `'magnetometer'`
* `'microphone'`
* `'midi-sysex'` (system-exclusive midi)
* `'midi'`
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'local-fonts'`
- `options` `BrowserContextGrantPermissionsOptions?` *(optional)*
- `Origin` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,15 @@ BrowserContext.grantPermissions(permissions, options);
* `'clipboard-write'`
* `'geolocation'`
* `'gyroscope'`
* `'local-fonts'`
* `'local-network-access'`
* `'magnetometer'`
* `'microphone'`
* `'midi-sysex'` (system-exclusive midi)
* `'midi'`
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'local-fonts'`
- `options` `BrowserContext.GrantPermissionsOptions` *(optional)*
- `setOrigin` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,15 @@ await browserContext.grantPermissions(permissions, options);
* `'clipboard-write'`
* `'geolocation'`
* `'gyroscope'`
* `'local-fonts'`
* `'local-network-access'`
* `'magnetometer'`
* `'microphone'`
* `'midi-sysex'` (system-exclusive midi)
* `'midi'`
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'local-fonts'`
- `options` [Object] *(optional)*
- `origin` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
20 changes: 10 additions & 10 deletions nodejs/versioned_docs/version-stable/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
options: --user 1001
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -335,7 +335,7 @@ trigger:

pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.56.0-noble
container: mcr.microsoft.com/playwright:v1.56.1-noble

steps:
- task: UseNode@1
Expand All @@ -359,7 +359,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- image: mcr.microsoft.com/playwright:v1.56.0-noble
- image: mcr.microsoft.com/playwright:v1.56.1-noble
```

Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
Expand All @@ -382,7 +382,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright:v1.56.0-noble' } }
agent { docker { image 'mcr.microsoft.com/playwright:v1.56.1-noble' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -399,7 +399,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).

```yml
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
```

### GitLab CI
Expand All @@ -412,7 +412,7 @@ stages:

tests:
stage: test
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
script:
...
```
Expand All @@ -427,7 +427,7 @@ stages:

tests:
stage: test
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
parallel: 7
script:
- npm ci
Expand All @@ -442,7 +442,7 @@ stages:

tests:
stage: test
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
parallel:
matrix:
- PROJECT: ['chromium', 'webkit']
Expand All @@ -458,7 +458,7 @@ To run Playwright tests on Google Cloud Build, use our public Docker image ([see

```yml
steps:
- name: mcr.microsoft.com/playwright:v1.56.0-noble
- name: mcr.microsoft.com/playwright:v1.56.1-noble
script:
...
env:
Expand All @@ -476,7 +476,7 @@ type: docker

steps:
- name: test
image: mcr.microsoft.com/playwright:v1.56.0-noble
image: mcr.microsoft.com/playwright:v1.56.1-noble
commands:
- npx playwright test
```
Expand Down
18 changes: 9 additions & 9 deletions nodejs/versioned_docs/version-stable/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image

```bash
docker pull mcr.microsoft.com/playwright:v1.56.0-noble
docker pull mcr.microsoft.com/playwright:v1.56.1-noble
```

### Run the image
Expand All @@ -34,15 +34,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.

```bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.56.0-noble /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.56.1-noble /bin/bash
```

#### Crawling and scraping

On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.

```bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.56.0-noble /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.56.1-noble /bin/bash
```

[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
Expand Down Expand Up @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the
Start the Playwright Server in Docker:

```bash
docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.56.0-noble /bin/sh -c "npx -y playwright@1.56.0 run-server --port 3000 --host 0.0.0.0"
docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.56.1-noble /bin/sh -c "npx -y playwright@1.56.1 run-server --port 3000 --host 0.0.0.0"
```

#### Connecting to the Server
Expand All @@ -105,7 +105,7 @@ const browser = await playwright['chromium'].connect('ws://127.0.0.1:3000/');
If you need to access local servers from within the Docker container:

```bash
docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.56.0-noble /bin/sh -c "npx -y playwright@1.56.0 run-server --port 3000 --host 0.0.0.0"
docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.56.1-noble /bin/sh -c "npx -y playwright@1.56.1 run-server --port 3000 --host 0.0.0.0"
```

This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers.
Expand All @@ -120,9 +120,9 @@ When running tests remotely, ensure the Playwright version in your tests matches
See [all available image tags].

We currently publish images with the following tags:
- `:v1.56.0` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.56.0-noble` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.56.0-jammy` - Playwright v1.56.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.56.1` - Playwright v1.56.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.56.1-noble` - Playwright v1.56.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.56.1-jammy` - Playwright v1.56.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).

:::note

Expand All @@ -146,7 +146,7 @@ To run Playwright inside Docker, you need to have Node.js, [Playwright browsers]
```Dockerfile
FROM node:20-bookworm

RUN npx -y playwright@1.56.0 install --with-deps
RUN npx -y playwright@1.56.1 install --with-deps
```


Expand Down
8 changes: 4 additions & 4 deletions nodejs/versioned_docs/version-stable/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
8 changes: 4 additions & 4 deletions nodejs/versioned_docs/version-stable/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
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,15 @@ browser_context.grant_permissions(permissions, **kwargs)
* `'clipboard-write'`
* `'geolocation'`
* `'gyroscope'`
* `'local-fonts'`
* `'local-network-access'`
* `'magnetometer'`
* `'microphone'`
* `'midi-sysex'` (system-exclusive midi)
* `'midi'`
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'local-fonts'`
- `origin` [str] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

The [origin] to grant permissions to, e.g. "https://example.com".
Expand Down
Loading