Skip to content
Open
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
6 changes: 6 additions & 0 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ await browser.CloseAsync();
- `Permissions` [IEnumerable]?&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-permissions"/><a href="#browser-new-context-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.GrantPermissionsAsync()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `PierceFrames` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-pierce-frames"/><a href="#browser-new-context-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.PierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `Proxy` Proxy? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-proxy"/><a href="#browser-new-context-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Expand Down Expand Up @@ -533,6 +536,9 @@ await Browser.NewPageAsync(options);
- `Permissions` [IEnumerable]?&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-permissions"/><a href="#browser-new-page-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.GrantPermissionsAsync()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `PierceFrames` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-pierce-frames"/><a href="#browser-new-page-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.PierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `Proxy` Proxy? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-proxy"/><a href="#browser-new-page-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Expand Down
3 changes: 3 additions & 0 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `Permissions` [IEnumerable]?&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-permissions"/><a href="#browser-type-launch-persistent-context-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.GrantPermissionsAsync()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `PierceFrames` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-pierce-frames"/><a href="#browser-type-launch-persistent-context-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.PierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `Proxy` Proxy? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-proxy"/><a href="#browser-type-launch-persistent-context-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Expand Down
6 changes: 6 additions & 0 deletions dotnet/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,12 @@ var locator = frame.PierceFrames.GetByRole(AriaRole.Button);
await locator.ClickAsync();
```

**Arguments**
- `options` `FramePierceFramesOptions?` *(optional)*
- `Pierce` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-pierce-frames-option-pierce"/><a href="#frame-pierce-frames-option-pierce" class="list-anchor">#</a>

Whether to pierce frames. Pass `false` to opt out of frame piercing enabled by the [PierceFrames](/api/class-browser.mdx#browser-new-context-option-pierce-frames) context option. Defaults to `true`.

**Returns**
- [FrameLocator]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-pierce-frames-return"/><a href="#frame-pierce-frames-return" class="list-anchor">#</a>

Expand Down
6 changes: 6 additions & 0 deletions dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,12 @@ var locator = page.PierceFrames.GetByRole(AriaRole.Button);
await locator.ClickAsync();
```

**Arguments**
- `options` `PagePierceFramesOptions?` *(optional)*
- `Pierce` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-pierce-frames-option-pierce"/><a href="#page-pierce-frames-option-pierce" class="list-anchor">#</a>

Whether to pierce frames. Pass `false` to opt out of frame piercing enabled by the [PierceFrames](/api/class-browser.mdx#browser-new-context-option-pierce-frames) context option. Defaults to `true`.

**Returns**
- [FrameLocator]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-pierce-frames-return"/><a href="#page-pierce-frames-return" class="list-anchor">#</a>

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ See [system requirements](./intro.mdx#system-requirements) for officially suppor

## Configure Browsers

Playwright can run tests on Chromium, WebKit and Firefox browsers as well as branded browsers such as Google Chrome and Microsoft Edge. It can also run on emulated tablet and mobile devices. See the [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json) for a complete list of selected desktop, tablet and mobile devices.
Playwright can run tests on Chromium, WebKit and Firefox browsers as well as branded browsers such as Google Chrome and Microsoft Edge. It can also run on emulated tablet and mobile devices. See the [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/isomorphic/deviceDescriptorsSource.json) for a complete list of selected desktop, tablet and mobile devices.

### Run tests on different browsers

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/emulation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ With Playwright you can test your app on any browser as well as emulate a real d

## Devices

Playwright comes with a [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json) using [Playwright.Devices](/api/class-playwright.mdx#playwright-devices) for selected desktop, tablet and mobile devices. It can be used to simulate browser behavior for a specific device such as user agent, screen size, viewport and if it has touch enabled. All tests will run with the specified device parameters.
Playwright comes with a [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/isomorphic/deviceDescriptorsSource.json) using [Playwright.Devices](/api/class-playwright.mdx#playwright-devices) for selected desktop, tablet and mobile devices. It can be used to simulate browser behavior for a specific device such as user agent, screen size, viewport and if it has touch enabled. All tests will run with the specified device parameters.

```csharp
using Microsoft.Playwright;
Expand Down
8 changes: 7 additions & 1 deletion dotnet/docs/getting-started-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Coding agents like Claude Code and GitHub Copilot can use locally installed skil
playwright-cli install --skills
```

To share the skills across all your projects, add the `-g` flag to install them into your home directory (`~/.claude/skills` or, with `--skills=agents`, `~/.agents/skills`):

```bash
playwright-cli install --skills -g
```

### Skills-less operation

You can also point your agent at the CLI directly and let it discover commands on its own:
Expand Down Expand Up @@ -103,7 +109,7 @@ playwright-cli check <ref> # check a checkbox or radio button
playwright-cli uncheck <ref> # uncheck a checkbox
playwright-cli hover <ref> # hover over element
playwright-cli drag <startRef> <endRef> # drag and drop between elements
playwright-cli upload <file> # upload files
playwright-cli upload <files...> # upload one or multiple files
playwright-cli close # close the page
```

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

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

## Version 1.62

### 🖼️ WebP screenshots

[Page.ScreenshotAsync()](/api/class-page.mdx#page-screenshot) and [Locator.ScreenshotAsync()](/api/class-locator.mdx#locator-screenshot) can now capture screenshots in the WebP format — Playwright infers the format from a `.webp` file extension, or you can set the `type` explicitly. Quality `100` (the default) is lossless, while lower values use lossy compression:

```csharp
await page.ScreenshotAsync(new() { Path = "homepage.webp", Quality = 50 });
```

### New APIs
- New `scroll` option (`"auto"` | `"none"`) on actions to opt out of Playwright's automatic scroll-into-view.
- New [Locator.WaitForFunctionAsync()](/api/class-locator.mdx#locator-wait-for-function) waits until a function — called with the matching element — returns a truthy value.
- New [ApiResponse.Timing](/api/class-apiresponse.mdx#api-response-timing) returns resource timing information for an API response.

### Announcements
* 📋 The clipboard is now isolated from the operating system in headless mode, so tests that use `navigator.clipboard` no longer read or overwrite the clipboard of the machine running them.
* ⚠️ Debian 11 is not supported anymore.

### Browser Versions
- Chromium 151.0.7922.34
- Mozilla Firefox 153.0
- WebKit 26.5

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

## Version 1.61

### 🔑 WebAuthn passkeys
Expand Down
6 changes: 6 additions & 0 deletions java/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ browser.close();
- `setPermissions` [List]&lt;[String]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-permissions"/><a href="#browser-new-context-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.grantPermissions()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `setPierceFrames` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-pierce-frames"/><a href="#browser-new-context-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.pierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `setProxy` Proxy *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-proxy"/><a href="#browser-new-context-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Expand Down Expand Up @@ -539,6 +542,9 @@ Browser.newPage(options);
- `setPermissions` [List]&lt;[String]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-permissions"/><a href="#browser-new-page-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.grantPermissions()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `setPierceFrames` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-pierce-frames"/><a href="#browser-new-page-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.pierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `setProxy` Proxy *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-proxy"/><a href="#browser-new-page-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Expand Down
3 changes: 3 additions & 0 deletions java/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setPermissions` [List]&lt;[String]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-permissions"/><a href="#browser-type-launch-persistent-context-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [BrowserContext.grantPermissions()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `setPierceFrames` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-pierce-frames"/><a href="#browser-type-launch-persistent-context-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [Page.pierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `setProxy` Proxy *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-proxy"/><a href="#browser-type-launch-persistent-context-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Expand Down
6 changes: 6 additions & 0 deletions java/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,12 @@ Locator locator = frame.pierceFrames().getByRole(AriaRole.BUTTON);
locator.click();
```

**Arguments**
- `options` `Frame.PierceFramesOptions` *(optional)*
- `setPierce` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-pierce-frames-option-pierce"/><a href="#frame-pierce-frames-option-pierce" class="list-anchor">#</a>

Whether to pierce frames. Pass `false` to opt out of frame piercing enabled by the [setPierceFrames](/api/class-browser.mdx#browser-new-context-option-pierce-frames) context option. Defaults to `true`.

**Returns**
- [FrameLocator]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-pierce-frames-return"/><a href="#frame-pierce-frames-return" class="list-anchor">#</a>

Expand Down
6 changes: 6 additions & 0 deletions java/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,12 @@ Locator locator = page.pierceFrames().getByRole(AriaRole.BUTTON);
locator.click();
```

**Arguments**
- `options` `Page.PierceFramesOptions` *(optional)*
- `setPierce` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-pierce-frames-option-pierce"/><a href="#page-pierce-frames-option-pierce" class="list-anchor">#</a>

Whether to pierce frames. Pass `false` to opt out of frame piercing enabled by the [setPierceFrames](/api/class-browser.mdx#browser-new-context-option-pierce-frames) context option. Defaults to `true`.

**Returns**
- [FrameLocator]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-pierce-frames-return"/><a href="#page-pierce-frames-return" class="list-anchor">#</a>

Expand Down
2 changes: 1 addition & 1 deletion java/docs/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ See [system requirements](./intro.mdx#system-requirements) for officially suppor

## Configure Browsers

Playwright can run tests on Chromium, WebKit and Firefox browsers as well as branded browsers such as Google Chrome and Microsoft Edge. It can also run on emulated tablet and mobile devices. See the [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json) for a complete list of selected desktop, tablet and mobile devices.
Playwright can run tests on Chromium, WebKit and Firefox browsers as well as branded browsers such as Google Chrome and Microsoft Edge. It can also run on emulated tablet and mobile devices. See the [registry of device parameters](https://github.com/microsoft/playwright/blob/main/packages/isomorphic/deviceDescriptorsSource.json) for a complete list of selected desktop, tablet and mobile devices.

### Run tests on different browsers

Expand Down
8 changes: 7 additions & 1 deletion java/docs/getting-started-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Coding agents like Claude Code and GitHub Copilot can use locally installed skil
playwright-cli install --skills
```

To share the skills across all your projects, add the `-g` flag to install them into your home directory (`~/.claude/skills` or, with `--skills=agents`, `~/.agents/skills`):

```bash
playwright-cli install --skills -g
```

### Skills-less operation

You can also point your agent at the CLI directly and let it discover commands on its own:
Expand Down Expand Up @@ -103,7 +109,7 @@ playwright-cli check <ref> # check a checkbox or radio button
playwright-cli uncheck <ref> # uncheck a checkbox
playwright-cli hover <ref> # hover over element
playwright-cli drag <startRef> <endRef> # drag and drop between elements
playwright-cli upload <file> # upload files
playwright-cli upload <files...> # upload one or multiple files
playwright-cli close # close the page
```

Expand Down
30 changes: 30 additions & 0 deletions java/docs/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@ import HTMLCard from '@site/src/components/HTMLCard';

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

## Version 1.62

### 🖼️ WebP screenshots

[Page.screenshot()](/api/class-page.mdx#page-screenshot) and [Locator.screenshot()](/api/class-locator.mdx#locator-screenshot) can now capture screenshots in the WebP format — Playwright infers the format from a `.webp` file extension, or you can set the `type` explicitly. Quality `100` (the default) is lossless, while lower values use lossy compression:

```java
page.screenshot(new Page.ScreenshotOptions()
.setPath(Paths.get("homepage.webp"))
.setQuality(50));
```

### New APIs
- New `scroll` option (`"auto"` | `"none"`) on actions to opt out of Playwright's automatic scroll-into-view.
- New [Locator.waitForFunction()](/api/class-locator.mdx#locator-wait-for-function) waits until a function — called with the matching element — returns a truthy value.
- New [APIResponse.timing()](/api/class-apiresponse.mdx#api-response-timing) returns resource timing information for an API response.

### Announcements
* 📋 The clipboard is now isolated from the operating system in headless mode, so tests that use `navigator.clipboard` no longer read or overwrite the clipboard of the machine running them.
* ⚠️ Debian 11 is not supported anymore.

### Browser Versions
- Chromium 151.0.7922.34
- Mozilla Firefox 153.0
- WebKit 26.5

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

## Version 1.61

### 🔑 WebAuthn passkeys
Expand Down
3 changes: 3 additions & 0 deletions nodejs/docs/api/class-androiddevice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ await androidDevice.launchBrowser(options);
- `permissions` [Array]&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-permissions"/><a href="#android-device-launch-browser-option-permissions" class="list-anchor">#</a>

A list of permissions to grant to all pages in this context. See [browserContext.grantPermissions()](/api/class-browsercontext.mdx#browser-context-grant-permissions) for more details. Defaults to none.
- `pierceFrames` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-pierce-frames"/><a href="#android-device-launch-browser-option-pierce-frames" class="list-anchor">#</a>

If set to true, all selectors in this context will pierce frames by default, as if every locator was created through [page.pierceFrames()](/api/class-page.mdx#page-pierce-frames). Defaults to `false`.
- `pkg` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-pkg"/><a href="#android-device-launch-browser-option-pkg" class="list-anchor">#</a>

Optional package name to launch instead of default Chrome for Android.
Expand Down
Loading
Loading