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
3 changes: 3 additions & 0 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,9 @@ await BrowserContext.RouteFromHARAsync(har, options);

Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` `BrowserContextRouteFromHAROptions?` *(optional)*
- `InterceptAPIRequests` [bool]? *(optional)* <font size="2">Added in: v1.62</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-intercept-api-requests"/><a href="#browser-context-route-from-har-option-intercept-api-requests" class="list-anchor">#</a>

If set to `true`, requests made via [APIRequestContext] (such as [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) or [Page.APIRequest](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `NotFound` `enum HarNotFound { Abort, Fallback }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-not-found"/><a href="#browser-context-route-from-har-option-not-found" class="list-anchor">#</a>
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
Expand Down
3 changes: 2 additions & 1 deletion dotnet/docs/getting-started-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Playwright comes with `playwright-cli`, a command-line interface for browser aut
## Prerequisites

Before you begin, make sure you have the following installed:
- [Node.js](https://nodejs.org/) 18 or newer
- [Node.js](https://nodejs.org/) 20 or newer
- A coding agent: Claude Code, GitHub Copilot, or similar

## Installation
Expand Down Expand Up @@ -132,6 +132,7 @@ playwright-cli snapshot --filename=f # save snapshot to specific file
playwright-cli screenshot # screenshot of the current page
playwright-cli screenshot [ref] # screenshot of a specific element
playwright-cli screenshot --filename=f # save with specific filename
playwright-cli screenshot --hires # capture using device pixels
playwright-cli pdf # save page as PDF
```

Expand Down
4 changes: 3 additions & 1 deletion dotnet/docs/getting-started-mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Playwright MCP server provides browser automation capabilities through the [
## Prerequisites

Before you begin, make sure you have the following installed:
- [Node.js](https://nodejs.org/) 18 or newer
- [Node.js](https://nodejs.org/) 20 or newer
- An MCP client: VS Code, Cursor, Windsurf, Claude Code, Claude Desktop, or similar

## Getting Started
Expand Down Expand Up @@ -194,6 +194,8 @@ When running a headed browser on a system without a display or from IDE worker p
npx @playwright/mcp@latest --port 8931
```

HTTP sessions use a five-second heartbeat timeout. If your MCP client or proxy does not answer server-initiated pings, set `PLAYWRIGHT_MCP_PING_TIMEOUT_MS` to a longer timeout in milliseconds. Set it to `0` to disable the heartbeat.

Then point your MCP client to the HTTP endpoint:

```json
Expand Down
3 changes: 3 additions & 0 deletions java/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ BrowserContext.routeFromHAR(har, options);

Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` `BrowserContext.RouteFromHAROptions` *(optional)*
- `setInterceptAPIRequests` [boolean] *(optional)* <font size="2">Added in: v1.62</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-intercept-api-requests"/><a href="#browser-context-route-from-har-option-intercept-api-requests" class="list-anchor">#</a>

If set to `true`, requests made via [APIRequestContext] (such as [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) or [Page.request()](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `setNotFound` `enum HarNotFound { ABORT, FALLBACK }` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-not-found"/><a href="#browser-context-route-from-har-option-not-found" class="list-anchor">#</a>
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
Expand Down
12 changes: 6 additions & 6 deletions java/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/java:v1.60.0-noble
image: mcr.microsoft.com/playwright/java:v1.61.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -160,7 +160,7 @@ trigger:

pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/java:v1.60.0-noble
container: mcr.microsoft.com/playwright/java:v1.61.0-noble

steps:
- task: JavaToolInstaller@1
Expand All @@ -183,7 +183,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- image: mcr.microsoft.com/playwright/java:v1.60.0-noble
- image: mcr.microsoft.com/playwright/java:v1.61.0-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 @@ -194,7 +194,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.60.0-noble' } }
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.61.0-noble' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -211,7 +211,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/java:v1.60.0-noble
image: mcr.microsoft.com/playwright/java:v1.61.0-noble
```

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

tests:
stage: test
image: mcr.microsoft.com/playwright/java:v1.60.0-noble
image: mcr.microsoft.com/playwright/java:v1.61.0-noble
script:
...
```
Expand Down
18 changes: 9 additions & 9 deletions java/docs/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/java:v1.60.0-noble
docker pull mcr.microsoft.com/playwright/java:v1.61.0-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/java:v1.60.0-noble /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.61.0-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/java:v1.60.0-noble /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.61.0-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.60.0-noble /bin/sh -c "npx -y playwright@1.60.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.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 run-server --port 3000 --host 0.0.0.0"
```

#### Connecting to the Server
Expand All @@ -107,7 +107,7 @@ public class App {
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.60.0-noble /bin/sh -c "npx -y playwright@1.60.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.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 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 Down Expand Up @@ -140,10 +140,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo
See [all available image tags].

We currently publish images with the following tags:
- `:v1.60.0` - Playwright v1.60.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.60.0-noble` - Playwright v1.60.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.60.0-jammy` - Playwright v1.60.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.60.0-resolute` - Playwright v1.60.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon).
- `:v1.61.0` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.61.0-noble` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.61.0-jammy` - Playwright v1.61.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.61.0-resolute` - Playwright v1.61.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon).

:::note

Expand Down
3 changes: 2 additions & 1 deletion java/docs/getting-started-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Playwright comes with `playwright-cli`, a command-line interface for browser aut
## Prerequisites

Before you begin, make sure you have the following installed:
- [Node.js](https://nodejs.org/) 18 or newer
- [Node.js](https://nodejs.org/) 20 or newer
- A coding agent: Claude Code, GitHub Copilot, or similar

## Installation
Expand Down Expand Up @@ -132,6 +132,7 @@ playwright-cli snapshot --filename=f # save snapshot to specific file
playwright-cli screenshot # screenshot of the current page
playwright-cli screenshot [ref] # screenshot of a specific element
playwright-cli screenshot --filename=f # save with specific filename
playwright-cli screenshot --hires # capture using device pixels
playwright-cli pdf # save page as PDF
```

Expand Down
4 changes: 3 additions & 1 deletion java/docs/getting-started-mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Playwright MCP server provides browser automation capabilities through the [
## Prerequisites

Before you begin, make sure you have the following installed:
- [Node.js](https://nodejs.org/) 18 or newer
- [Node.js](https://nodejs.org/) 20 or newer
- An MCP client: VS Code, Cursor, Windsurf, Claude Code, Claude Desktop, or similar

## Getting Started
Expand Down Expand Up @@ -194,6 +194,8 @@ When running a headed browser on a system without a display or from IDE worker p
npx @playwright/mcp@latest --port 8931
```

HTTP sessions use a five-second heartbeat timeout. If your MCP client or proxy does not answer server-initiated pings, set `PLAYWRIGHT_MCP_PING_TIMEOUT_MS` to a longer timeout in milliseconds. Set it to `0` to disable the heartbeat.

Then point your MCP client to the HTTP endpoint:

```json
Expand Down
2 changes: 1 addition & 1 deletion java/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class App {
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.60.0</version>
<version>1.61.0</version>
</dependency>
</dependencies>
<build>
Expand Down
4 changes: 2 additions & 2 deletions java/docs/test-runners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ repositories {
}

dependencies {
implementation 'com.microsoft.playwright:playwright:1.60.0'
implementation 'com.microsoft.playwright:playwright:1.61.0'
}

application {
Expand Down Expand Up @@ -231,7 +231,7 @@ repositories {
}

dependencies {
implementation("com.microsoft.playwright:playwright:1.60.0")
implementation("com.microsoft.playwright:playwright:1.61.0")
}

application {
Expand Down
5 changes: 4 additions & 1 deletion nodejs/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,9 @@ await browserContext.routeFromHAR(har, options);

Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` [Object] *(optional)*
- `interceptAPIRequests` [boolean] *(optional)* <font size="2">Added in: v1.62</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-intercept-api-requests"/><a href="#browser-context-route-from-har-option-intercept-api-requests" class="list-anchor">#</a>

If set to `true`, requests made via [APIRequestContext] (such as [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `notFound` "abort" | "fallback" *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-route-from-har-option-not-found"/><a href="#browser-context-route-from-har-option-not-found" class="list-anchor">#</a>
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
Expand Down Expand Up @@ -1057,7 +1060,7 @@ const page = await pagePromise;
Receives the event data and resolves to truthy value when the waiting should resolve.
- `signal` [AbortSignal] *(optional)* <font size="2">Added in: v1.61</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-wait-for-event-option-signal"/><a href="#browser-context-wait-for-event-option-signal" class="list-anchor">#</a>

Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout; pass `timeout: 0` to disable the timeout entirely.
Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.

**Returns**
- [Promise]&lt;[Object]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-wait-for-event-return"/><a href="#browser-context-wait-for-event-return" class="list-anchor">#</a>
Expand Down
7 changes: 6 additions & 1 deletion nodejs/docs/api/class-coverage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ await coverage.startJSCoverage(options);
Whether anonymous scripts generated by the page should be reported. Defaults to `false`.
- `resetOnNavigation` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="coverage-start-js-coverage-option-reset-on-navigation"/><a href="#coverage-start-js-coverage-option-reset-on-navigation" class="list-anchor">#</a>

Whether to reset coverage on every navigation. Defaults to `true`.
:::warning[Discouraged]
Settings this to `false` may still reset on navigations.
:::


Whether to reset coverage on every navigation. Defaults to `true`. Note that passing `false` does not guarantee that coverage persists through navigations, due to browser architecture limitations.

**Returns**
- [Promise]&lt;[void]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="coverage-start-js-coverage-return"/><a href="#coverage-start-js-coverage-return" class="list-anchor">#</a>
Expand Down
Loading
Loading