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
2 changes: 2 additions & 0 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ var page = defaultContext.Pages[0];
- `endpointURL` [string] <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-endpoint-url"/><a href="#browser-type-connect-over-cdp-option-endpoint-url" class="list-anchor">#</a>

A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.

Alternatively, a browser channel name such as `chrome` or `msedge` to connect to a browser with remote debugging enabled in its default user data directory. On Linux, Playwright uses `CHROME_USER_DATA_DIR` when set. Otherwise, it uses `CHROME_CONFIG_HOME`, then `XDG_CONFIG_HOME`, then `~/.config` to locate that directory.
- `options` `BrowserTypeConnectOverCDPOptions?` *(optional)*
- `ArtifactsDir` [string]? *(optional)* <font size="2">Added in: v1.61</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-artifacts-dir"/><a href="#browser-type-connect-over-cdp-option-artifacts-dir" class="list-anchor">#</a>

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

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

## Version 1.65

### 🧾 Locator code in C#

A locator from [Locator.NormalizeAsync()](/api/class-locator.mdx#locator-normalize) now converts to a string as C# code. Use it with [Page.GetByRef()](/api/class-page.mdx#page-get-by-ref) to turn an element that an agent picks from a [Page.AriaSnapshotAsync()](/api/class-page.mdx#page-aria-snapshot) in the `"ai"` mode into code for your test:

```csharp
var normalized = await page.GetByRef("e2").NormalizeAsync();
Console.WriteLine(normalized.ToString());
// GetByRole(AriaRole.Button, new() { Name = "Submit" })
```

### New APIs
- New option [Timeout](/api/class-cdpsession.mdx#cdp-session-send-option-timeout) in [CdpSession.SendAsync()](/api/class-cdpsession.mdx#cdp-session-send).

### Breaking Changes ⚠️
- Actions such as [Locator.ClickAsync()](/api/class-locator.mdx#locator-click), [Locator.CheckAsync()](/api/class-locator.mdx#locator-check), [Locator.TapAsync()](/api/class-locator.mdx#locator-tap), [Locator.FillAsync()](/api/class-locator.mdx#locator-fill), [Locator.ClearAsync()](/api/class-locator.mdx#locator-clear) and [Locator.SelectOptionAsync()](/api/class-locator.mdx#locator-select-option) now wait for the element to be [not inert](./actionability.mdx#not-inert). An action on an element with the `inert` attribute, or inside such an element, now times out if the element stays inert.
- Cookie matching now follows RFC 6265. With a URL, [BrowserContext.CookiesAsync()](/api/class-browsercontext.mdx#browser-context-cookies) and [ApiRequestContext.CookiesAsync()](/api/class-apirequestcontext.mdx#api-request-context-cookies) no longer return host-only cookies for subdomains or `Path=/api` cookies for `/apiv2`, and a `Path=/foo/` cookie does not match `/foo`. [APIRequestContext] sends a cookie without a name as `Cookie: x` instead of `Cookie: =x`, and stores `Set-Cookie: token` as a cookie without a name.
- Proxy credentials are no longer sent to websites. The credentials in the [Proxy](/api/class-browsertype.mdx#browser-type-launch-option-proxy) option now answer only proxy challenges. To authenticate on a website, use [HttpCredentials|HttpCredentialsList](/api/class-browser.mdx#browser-new-context-option-http-credentials).
- Text that the browser does not render, such as text that is not assigned to a slot or text directly inside a closed `<details>`, is no longer part of accessible names and aria snapshots. This can change the results of [Page.GetByRole()](/api/class-page.mdx#page-get-by-role) with a name, [Locator.AriaSnapshotAsync()](/api/class-locator.mdx#locator-aria-snapshot) and [Expect(Locator).ToMatchAriaSnapshotAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot).
- The `ParamsString` option in [APIRequestContext] requests is now appended to the query that the URL already has, instead of replacing it.

### Browser Versions
- Chromium 158.0.8127.2
- Mozilla Firefox 159.0
- WebKit 27.2

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

## Version 1.64

### 🧰 WebMCP
Expand Down
2 changes: 2 additions & 0 deletions java/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Page page = defaultContext.pages().get(0);
- `endpointURL` [String] <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-endpoint-url"/><a href="#browser-type-connect-over-cdp-option-endpoint-url" class="list-anchor">#</a>

A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.

Alternatively, a browser channel name such as `chrome` or `msedge` to connect to a browser with remote debugging enabled in its default user data directory. On Linux, Playwright uses `CHROME_USER_DATA_DIR` when set. Otherwise, it uses `CHROME_CONFIG_HOME`, then `XDG_CONFIG_HOME`, then `~/.config` to locate that directory.
- `options` `BrowserType.ConnectOverCDPOptions` *(optional)*
- `setArtifactsDir` [Path] *(optional)* <font size="2">Added in: v1.61</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-artifacts-dir"/><a href="#browser-type-connect-over-cdp-option-artifacts-dir" class="list-anchor">#</a>

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.65

### 🧾 Locator code in Java

A locator from [Locator.normalize()](/api/class-locator.mdx#locator-normalize) now converts to a string as Java code. Use it with [Page.getByRef()](/api/class-page.mdx#page-get-by-ref) to turn an element that an agent picks from a [Page.ariaSnapshot()](/api/class-page.mdx#page-aria-snapshot) in the `"ai"` mode into code for your test:

```java
Locator normalized = page.getByRef("e2").normalize();
System.out.println(normalized.toString());
// getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Submit"))
```

### New APIs
- New option [setTimeout](/api/class-cdpsession.mdx#cdp-session-send-option-timeout) in [CDPSession.send()](/api/class-cdpsession.mdx#cdp-session-send).

### Breaking Changes ⚠️
- Actions such as [Locator.click()](/api/class-locator.mdx#locator-click), [Locator.check()](/api/class-locator.mdx#locator-check), [Locator.tap()](/api/class-locator.mdx#locator-tap), [Locator.fill()](/api/class-locator.mdx#locator-fill), [Locator.clear()](/api/class-locator.mdx#locator-clear) and [Locator.selectOption()](/api/class-locator.mdx#locator-select-option) now wait for the element to be [not inert](./actionability.mdx#not-inert). An action on an element with the `inert` attribute, or inside such an element, now times out if the element stays inert.
- Cookie matching now follows RFC 6265. With a URL, [BrowserContext.cookies()](/api/class-browsercontext.mdx#browser-context-cookies) and [APIRequestContext.cookies()](/api/class-apirequestcontext.mdx#api-request-context-cookies) no longer return host-only cookies for subdomains or `Path=/api` cookies for `/apiv2`, and a `Path=/foo/` cookie does not match `/foo`. [APIRequestContext] sends a cookie without a name as `Cookie: x` instead of `Cookie: =x`, and stores `Set-Cookie: token` as a cookie without a name.
- Proxy credentials are no longer sent to websites. The credentials in the [setProxy](/api/class-browsertype.mdx#browser-type-launch-option-proxy) option now answer only proxy challenges. To authenticate on a website, use [setHttpCredentials](/api/class-browser.mdx#browser-new-context-option-http-credentials).
- Text that the browser does not render, such as text that is not assigned to a slot or text directly inside a closed `<details>`, is no longer part of accessible names and aria snapshots. This can change the results of [Page.getByRole()](/api/class-page.mdx#page-get-by-role) with a name, [Locator.ariaSnapshot()](/api/class-locator.mdx#locator-aria-snapshot) and [assertThat(locator).matchesAriaSnapshot()](/api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot).

### Browser Versions
- Chromium 158.0.8127.2
- Mozilla Firefox 159.0
- WebKit 27.2

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

## Version 1.64

### 🧰 WebMCP
Expand Down
7 changes: 0 additions & 7 deletions nodejs/docs/api/class-androiddevice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,6 @@ await androidDevice.launchBrowser(options);
- `locale` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-locale"/><a href="#android-device-launch-browser-option-locale" class="list-anchor">#</a>

Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our [emulation guide](../emulation.mdx#locale--timezone).
- `locatorOmitHidden` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-locator-omit-hidden"/><a href="#android-device-launch-browser-option-locator-omit-hidden" class="list-anchor">#</a>

Whether locators omit hidden elements by default. Defaults to `false`. If set to `true`, each locator is resolved as if [locator.visible()](/api/class-locator.mdx#locator-visible) were appended: only the final matched element is checked for [visibility](../actionability.mdx#visible), not its intermediate ancestors. This affects actions, assertions, counts and element evaluation, but not selector-based methods such as [page.$()](/api/class-page.mdx#page-query-selector).

Pass `omitHidden: false` when creating a locator to opt out. The override is preserved by `filter()`, `first()`, `last()`, `nth()`, `and()`, `or()` and `describe()`. Creating a descendant locator uses the context default again, unless an override is supplied for that descendant. Explicit visibility filters are never removed. Role locators still apply their accessibility matching rules; use `getByRole(..., { includeHidden: true, omitHidden: false })` to include hidden elements when this context option is enabled.

With `true`, hidden elements are treated as missing by `toBeHidden()` and `waitFor({ state: 'hidden' })`. To check attachment of a hidden element, create the locator with `omitHidden: false`.
- `logger` [Logger] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-logger"/><a href="#android-device-launch-browser-option-logger" class="list-anchor">#</a>

:::warning[Deprecated]
Expand Down
14 changes: 0 additions & 14 deletions nodejs/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,6 @@ If directly using this method to create [BrowserContext]s, it is best practice t
- `locale` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-locale"/><a href="#browser-new-context-option-locale" class="list-anchor">#</a>

Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our [emulation guide](../emulation.mdx#locale--timezone).
- `locatorOmitHidden` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-locator-omit-hidden"/><a href="#browser-new-context-option-locator-omit-hidden" class="list-anchor">#</a>

Whether locators omit hidden elements by default. Defaults to `false`. If set to `true`, each locator is resolved as if [locator.visible()](/api/class-locator.mdx#locator-visible) were appended: only the final matched element is checked for [visibility](../actionability.mdx#visible), not its intermediate ancestors. This affects actions, assertions, counts and element evaluation, but not selector-based methods such as [page.$()](/api/class-page.mdx#page-query-selector).

Pass `omitHidden: false` when creating a locator to opt out. The override is preserved by `filter()`, `first()`, `last()`, `nth()`, `and()`, `or()` and `describe()`. Creating a descendant locator uses the context default again, unless an override is supplied for that descendant. Explicit visibility filters are never removed. Role locators still apply their accessibility matching rules; use `getByRole(..., { includeHidden: true, omitHidden: false })` to include hidden elements when this context option is enabled.

With `true`, hidden elements are treated as missing by `toBeHidden()` and `waitFor({ state: 'hidden' })`. To check attachment of a hidden element, create the locator with `omitHidden: false`.
- `logger` [Logger] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-logger"/><a href="#browser-new-context-option-logger" class="list-anchor">#</a>

:::warning[Deprecated]
Expand Down Expand Up @@ -626,13 +619,6 @@ await browser.newPage(options);
- `locale` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-locale"/><a href="#browser-new-page-option-locale" class="list-anchor">#</a>

Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our [emulation guide](../emulation.mdx#locale--timezone).
- `locatorOmitHidden` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-locator-omit-hidden"/><a href="#browser-new-page-option-locator-omit-hidden" class="list-anchor">#</a>

Whether locators omit hidden elements by default. Defaults to `false`. If set to `true`, each locator is resolved as if [locator.visible()](/api/class-locator.mdx#locator-visible) were appended: only the final matched element is checked for [visibility](../actionability.mdx#visible), not its intermediate ancestors. This affects actions, assertions, counts and element evaluation, but not selector-based methods such as [page.$()](/api/class-page.mdx#page-query-selector).

Pass `omitHidden: false` when creating a locator to opt out. The override is preserved by `filter()`, `first()`, `last()`, `nth()`, `and()`, `or()` and `describe()`. Creating a descendant locator uses the context default again, unless an override is supplied for that descendant. Explicit visibility filters are never removed. Role locators still apply their accessibility matching rules; use `getByRole(..., { includeHidden: true, omitHidden: false })` to include hidden elements when this context option is enabled.

With `true`, hidden elements are treated as missing by `toBeHidden()` and `waitFor({ state: 'hidden' })`. To check attachment of a hidden element, create the locator with `omitHidden: false`.
- `logger` [Logger] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-logger"/><a href="#browser-new-page-option-logger" class="list-anchor">#</a>

:::warning[Deprecated]
Expand Down
9 changes: 2 additions & 7 deletions nodejs/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ const page = defaultContext.pages()[0];
- `endpointURL` [string] <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-endpoint-url"/><a href="#browser-type-connect-over-cdp-option-endpoint-url" class="list-anchor">#</a>

A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.

Alternatively, a browser channel name such as `chrome` or `msedge` to connect to a browser with remote debugging enabled in its default user data directory. On Linux, Playwright uses `CHROME_USER_DATA_DIR` when set. Otherwise, it uses `CHROME_CONFIG_HOME`, then `XDG_CONFIG_HOME`, then `~/.config` to locate that directory.
- `options` [Object] *(optional)*
- `artifactsDir` [string] *(optional)* <font size="2">Added in: v1.61</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-artifacts-dir"/><a href="#browser-type-connect-over-cdp-option-artifacts-dir" class="list-anchor">#</a>

Expand Down Expand Up @@ -454,13 +456,6 @@ await browserType.launchPersistentContext(userDataDir, options);
- `locale` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-locale"/><a href="#browser-type-launch-persistent-context-option-locale" class="list-anchor">#</a>

Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our [emulation guide](../emulation.mdx#locale--timezone).
- `locatorOmitHidden` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-locator-omit-hidden"/><a href="#browser-type-launch-persistent-context-option-locator-omit-hidden" class="list-anchor">#</a>

Whether locators omit hidden elements by default. Defaults to `false`. If set to `true`, each locator is resolved as if [locator.visible()](/api/class-locator.mdx#locator-visible) were appended: only the final matched element is checked for [visibility](../actionability.mdx#visible), not its intermediate ancestors. This affects actions, assertions, counts and element evaluation, but not selector-based methods such as [page.$()](/api/class-page.mdx#page-query-selector).

Pass `omitHidden: false` when creating a locator to opt out. The override is preserved by `filter()`, `first()`, `last()`, `nth()`, `and()`, `or()` and `describe()`. Creating a descendant locator uses the context default again, unless an override is supplied for that descendant. Explicit visibility filters are never removed. Role locators still apply their accessibility matching rules; use `getByRole(..., { includeHidden: true, omitHidden: false })` to include hidden elements when this context option is enabled.

With `true`, hidden elements are treated as missing by `toBeHidden()` and `waitFor({ state: 'hidden' })`. To check attachment of a hidden element, create the locator with `omitHidden: false`.
- `logger` [Logger] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-logger"/><a href="#browser-type-launch-persistent-context-option-logger" class="list-anchor">#</a>

:::warning[Deprecated]
Expand Down
Loading
Loading