Skip to content
Closed
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 @@ -1369,7 +1369,7 @@ BrowserContext.WebError += async (_, webError) => {};

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.11</font><x-search>browserContext.event BackgroundPage</x-search>

:::warning Deprecated
:::warning[Deprecated]

Background pages have been removed from Chromium together with Manifest V2 extensions.

Expand All @@ -1393,7 +1393,7 @@ BrowserContext.BackgroundPage += async (_, page) => {};

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.11</font><x-search>browserContext.BackgroundPages</x-search>

:::warning Deprecated
:::warning[Deprecated]

Background pages have been removed from Chromium together with Manifest V2 extensions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ await ElementHandle.TextContentAsync();

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>elementHandle.TypeAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.FillAsync()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentiallyAsync()](/api/class-locator.mdx#locator-press-sequentially).

Expand Down
6 changes: 3 additions & 3 deletions dotnet/versioned_docs/version-stable/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,7 @@ await Frame.QuerySelectorAllAsync(selector);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.RunAndWaitForNavigationAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

This method is inherently racy, please use [Frame.WaitForURLAsync()](/api/class-frame.mdx#frame-wait-for-url) instead.

Expand Down Expand Up @@ -2130,7 +2130,7 @@ Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/Hist

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.WaitForNavigationAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

This method is inherently racy, please use [Frame.WaitForURLAsync()](/api/class-frame.mdx#frame-wait-for-url) instead.

Expand Down Expand Up @@ -2486,7 +2486,7 @@ await Frame.TextContentAsync(selector, options);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.TypeAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.FillAsync()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentiallyAsync()](/api/class-locator.mdx#locator-press-sequentially).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ await Expect(locator).ToBeVisibleAsync();

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.First</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.First](/api/class-locator.mdx#locator-first) followed by [Locator.ContentFrame](/api/class-locator.mdx#locator-content-frame) instead.

Expand All @@ -491,7 +491,7 @@ FrameLocator.First

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.Last</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.Last](/api/class-locator.mdx#locator-last) followed by [Locator.ContentFrame](/api/class-locator.mdx#locator-content-frame) instead.

Expand All @@ -515,7 +515,7 @@ FrameLocator.Last

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.Nth</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.Nth()](/api/class-locator.mdx#locator-nth) followed by [Locator.ContentFrame](/api/class-locator.mdx#locator-content-frame) instead.

Expand Down
2 changes: 1 addition & 1 deletion dotnet/versioned_docs/version-stable/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2580,7 +2580,7 @@ await Locator.ElementHandlesAsync();

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.14</font><x-search>locator.TypeAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.FillAsync()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentiallyAsync()](/api/class-locator.mdx#locator-press-sequentially).

Expand Down
6 changes: 3 additions & 3 deletions dotnet/versioned_docs/version-stable/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4413,7 +4413,7 @@ await Page.QuerySelectorAllAsync(selector);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.RunAndWaitForNavigationAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

This method is inherently racy, please use [Page.WaitForURLAsync()](/api/class-page.mdx#page-wait-for-url) instead.

Expand Down Expand Up @@ -4468,7 +4468,7 @@ Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/Hist

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.WaitForNavigationAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

This method is inherently racy, please use [Page.WaitForURLAsync()](/api/class-page.mdx#page-wait-for-url) instead.

Expand Down Expand Up @@ -4824,7 +4824,7 @@ await Page.TextContentAsync(selector, options);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.TypeAsync</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.FillAsync()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentiallyAsync()](/api/class-locator.mdx#locator-press-sequentially).

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

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

steps:
- task: UseDotNet@2
Expand All @@ -182,7 +182,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- image: mcr.microsoft.com/playwright/dotnet:v1.59.0-noble
- image: mcr.microsoft.com/playwright/dotnet:v1.60.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 @@ -193,7 +193,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

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

### GitLab CI
Expand Down
16 changes: 8 additions & 8 deletions dotnet/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/dotnet:v1.59.0-noble
docker pull mcr.microsoft.com/playwright/dotnet:v1.60.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/dotnet:v1.59.0-noble /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.60.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/dotnet:v1.59.0-noble /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.60.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.59.0-noble /bin/sh -c "npx -y playwright@1.59.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.60.0-noble /bin/sh -c "npx -y playwright@1.60.0 run-server --port 3000 --host 0.0.0.0"
```

#### Connecting to the Server
Expand All @@ -99,7 +99,7 @@ await using var browser = await playwright.Chromium.ConnectAsync("ws://127.0.0.1
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.59.0-noble /bin/sh -c "npx -y playwright@1.59.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.60.0-noble /bin/sh -c "npx -y playwright@1.60.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 @@ -132,9 +132,9 @@ 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.59.0` - Playwright v1.59.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.59.0-noble` - Playwright v1.59.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.59.0-jammy` - Playwright v1.59.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `: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).

:::note

Expand Down
71 changes: 71 additions & 0 deletions dotnet/versioned_docs/version-stable/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,77 @@ import HTMLCard from '@site/src/components/HTMLCard';

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

## Version 1.60

### 🌐 HAR recording on Tracing

[Tracing.StartHarAsync()](/api/class-tracing.mdx#tracing-start-har) / [Tracing.StopHarAsync()](/api/class-tracing.mdx#tracing-stop-har) expose HAR recording as a first-class tracing API, with the same `Content`, `Mode` and `UrlFilter` options as `RecordHar`:

```csharp
await context.Tracing.StartHarAsync("trace.har");
var page = await context.NewPageAsync();
await page.GotoAsync("https://playwright.dev");
await context.Tracing.StopHarAsync();
```

### 🪝 Drop API

New [Locator.DropAsync()](/api/class-locator.mdx#locator-drop) simulates an external drag-and-drop of files or clipboard-like data onto an element. Playwright dispatches `dragenter`, `dragover`, and `drop` with a synthetic [DataTransfer] in the page context — works cross-browser and is great for testing upload zones:

```csharp
await page.Locator("#dropzone").DropAsync(new() {
Files = new FilePayload() {
Name = "note.txt",
MimeType = "text/plain",
Buffer = Encoding.UTF8.GetBytes("hello"),
},
});

await page.Locator("#dropzone").DropAsync(new() {
Data = new Dictionary<string, string> {
["text/plain"] = "hello world",
["text/uri-list"] = "https://example.com",
},
});
```

### 🎯 Aria snapshots
- [Expect(Page).ToMatchAriaSnapshotAsync()](/api/class-pageassertions.mdx#page-assertions-to-match-aria-snapshot) now works on a [Page], in addition to a [Locator] — equivalent to asserting against `Page.Locator("body")`.
- New `Boxes` option on [Locator.AriaSnapshotAsync()](/api/class-locator.mdx#locator-aria-snapshot) / [Page.AriaSnapshotAsync()](/api/class-page.mdx#page-aria-snapshot) appends each element's bounding box as `[box=x,y,width,height]`, useful for AI consumption.

### New APIs

#### Browser, Context and Page
- Event [Browser.Context](/api/class-browser.mdx#browser-event-context) — fired when a new context is created on the browser.
- [BrowserContext] now mirrors lifecycle events from its pages: [BrowserContext.Download](/api/class-browsercontext.mdx#browser-context-event-download), [BrowserContext.FrameAttached](/api/class-browsercontext.mdx#browser-context-event-frame-attached), [BrowserContext.FrameDetached](/api/class-browsercontext.mdx#browser-context-event-frame-detached), [BrowserContext.FrameNavigated](/api/class-browsercontext.mdx#browser-context-event-frame-navigated), [BrowserContext.PageClose](/api/class-browsercontext.mdx#browser-context-event-page-close), [BrowserContext.PageLoad](/api/class-browsercontext.mdx#browser-context-event-page-load).

#### Locators and Assertions
- New option `Description` in [Page.GetByRole()](/api/class-page.mdx#page-get-by-role) / [Locator.GetByRole()](/api/class-locator.mdx#locator-get-by-role) / [Frame.GetByRole()](/api/class-frame.mdx#frame-get-by-role) / [FrameLocator.GetByRole()](/api/class-framelocator.mdx#frame-locator-get-by-role) for matching the [accessible description](https://www.w3.org/TR/wai-aria-1.2/#dfn-accessible-description).
- New option `Pseudo` in [Expect(Locator).ToHaveCSSAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-css) reads computed styles from `::before` or `::after`.
- New option `Style` in [Locator.HighlightAsync()](/api/class-locator.mdx#locator-highlight) applies extra inline CSS to the highlight overlay, plus new [Page.HideHighlightAsync()](/api/class-page.mdx#page-hide-highlight) to clear all highlights.

#### Network
- [WebSocketRoute.Protocols](/api/class-websocketroute.mdx#web-socket-route-protocols) returns the WebSocket subprotocols requested by the page.
- New option `NoDefaults` in [BrowserType.ConnectOverCDPAsync()](/api/class-browsertype.mdx#browser-type-connect-over-cdp) disables Playwright's default overrides on the default context (download behavior, focus emulation, media emulation), so attaching to a user's daily-driver browser doesn't disturb its state.

#### Errors
- New [WebError.Location](/api/class-weberror.mdx#web-error-location) mirrors [ConsoleMessage.Location](/api/class-consolemessage.mdx#console-message-location).

### 🛠️ Other improvements
- Trace Viewer adds a pretty-print toggle for JSON / form request and response bodies in the network details panel.

### Breaking Changes ⚠️
- Removed long-deprecated `Handle` option on `BrowserContext.ExposeBindingAsync` and `Page.ExposeBindingAsync`.

### Browser Versions
- Chromium 148.0.7778.96
- Mozilla Firefox 150.0.2
- WebKit 26.4

This version was also tested against the following stable channels:
- Google Chrome 147
- Microsoft Edge 147

## Version 1.59

### 🎬 Screencast
Expand Down
2 changes: 2 additions & 0 deletions dotnet/versioned_docs/version-stable/webview2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ By default, the WebView2 control will use the same user data directory for all i

Using the following, Playwright will run your WebView2 application as a sub-process, assign a unique user data directory to it and provide the [Page] instance to your test:

<!-- source code is available here to verify that the examples are working https://github.com/mxschmitt/playwright-webview2-demo -->

```csharp
// WebView2Test.cs
using System.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ BrowserContext.onWebError(handler)

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.11</font><x-search>browserContext.onBackgroundPage(handler)</x-search>

:::warning Deprecated
:::warning[Deprecated]

Background pages have been removed from Chromium together with Manifest V2 extensions.

Expand All @@ -1375,7 +1375,7 @@ BrowserContext.onBackgroundPage(handler)

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.11</font><x-search>browserContext.backgroundPages</x-search>

:::warning Deprecated
:::warning[Deprecated]

Background pages have been removed from Chromium together with Manifest V2 extensions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ ElementHandle.textContent();

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>elementHandle.type</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.fill()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.pressSequentially()](/api/class-locator.mdx#locator-press-sequentially).

Expand Down
4 changes: 2 additions & 2 deletions java/versioned_docs/version-stable/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@ Frame.textContent(selector, options);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.type</x-search>

:::warning Deprecated
:::warning[Deprecated]

In most cases, you should use [Locator.fill()](/api/class-locator.mdx#locator-fill) instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.pressSequentially()](/api/class-locator.mdx#locator-press-sequentially).

Expand Down Expand Up @@ -2521,7 +2521,7 @@ Frame.uncheck(selector, options);

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.waitForNavigation</x-search>

:::warning Deprecated
:::warning[Deprecated]

This method is inherently racy, please use [Frame.waitForURL()](/api/class-frame.mdx#frame-wait-for-url) instead.

Expand Down
6 changes: 3 additions & 3 deletions java/versioned_docs/version-stable/api/class-framelocator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ assertThat(locator).isVisible();

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.first</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.first()](/api/class-locator.mdx#locator-first) followed by [Locator.contentFrame()](/api/class-locator.mdx#locator-content-frame) instead.

Expand All @@ -490,7 +490,7 @@ FrameLocator.first();

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.last</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.last()](/api/class-locator.mdx#locator-last) followed by [Locator.contentFrame()](/api/class-locator.mdx#locator-content-frame) instead.

Expand All @@ -514,7 +514,7 @@ FrameLocator.last();

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.17</font><x-search>frameLocator.nth</x-search>

:::warning Deprecated
:::warning[Deprecated]

Use [Locator.nth()](/api/class-locator.mdx#locator-nth) followed by [Locator.contentFrame()](/api/class-locator.mdx#locator-content-frame) instead.

Expand Down
Loading
Loading