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
4 changes: 3 additions & 1 deletion dotnet/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ await ApiRequest.NewContextAsync(options);
- `FailOnStatusCode` [bool]? *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-fail-on-status-code"/><a href="#api-request-new-context-option-fail-on-status-code" class="list-anchor">#</a>

Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
- `HttpCredentials` HttpCredentials? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-http-credentials"/><a href="#api-request-new-context-option-http-credentials" class="list-anchor">#</a>
- `HttpCredentials|HttpCredentialsList` HttpCredentials|HttpCredentialsList? | [IEnumerable]?&lt;HttpCredentials|HttpCredentialsList&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-http-credentials"/><a href="#api-request-new-context-option-http-credentials" class="list-anchor">#</a>
- `Username` [string]


Expand All @@ -94,6 +94,8 @@ await ApiRequest.NewContextAsync(options);
This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.

Pass an array to use different credentials for different origins. The first entry that matches the request origin is used, and entries with no origin match any request.
- `IgnoreHTTPSErrors` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-ignore-https-errors"/><a href="#api-request-new-context-option-ignore-https-errors" class="list-anchor">#</a>

Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
Expand Down
8 changes: 6 additions & 2 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ await browser.CloseAsync();
- `HasTouch` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-has-touch"/><a href="#browser-new-context-option-has-touch" class="list-anchor">#</a>

Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices).
- `HttpCredentials` HttpCredentials? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-http-credentials"/><a href="#browser-new-context-option-http-credentials" class="list-anchor">#</a>
- `HttpCredentials|HttpCredentialsList` HttpCredentials|HttpCredentialsList? | [IEnumerable]?&lt;HttpCredentials|HttpCredentialsList&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-http-credentials"/><a href="#browser-new-context-option-http-credentials" class="list-anchor">#</a>
- `Username` [string]


Expand All @@ -291,6 +291,8 @@ await browser.CloseAsync();
This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.

Pass an array to use different credentials for different origins. The first entry that matches the request origin is used, and entries with no origin match any request.
- `IgnoreHTTPSErrors` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-ignore-https-errors"/><a href="#browser-new-context-option-ignore-https-errors" class="list-anchor">#</a>

Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
Expand Down Expand Up @@ -496,7 +498,7 @@ await Browser.NewPageAsync(options);
- `HasTouch` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-has-touch"/><a href="#browser-new-page-option-has-touch" class="list-anchor">#</a>

Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices).
- `HttpCredentials` HttpCredentials? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-http-credentials"/><a href="#browser-new-page-option-http-credentials" class="list-anchor">#</a>
- `HttpCredentials|HttpCredentialsList` HttpCredentials|HttpCredentialsList? | [IEnumerable]?&lt;HttpCredentials|HttpCredentialsList&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-http-credentials"/><a href="#browser-new-page-option-http-credentials" class="list-anchor">#</a>
- `Username` [string]


Expand All @@ -511,6 +513,8 @@ await Browser.NewPageAsync(options);
This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.

Pass an array to use different credentials for different origins. The first entry that matches the request origin is used, and entries with no origin match any request.
- `IgnoreHTTPSErrors` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-ignore-https-errors"/><a href="#browser-new-page-option-ignore-https-errors" class="list-anchor">#</a>

Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
Expand Down
20 changes: 17 additions & 3 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,6 @@ 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 Expand Up @@ -1161,6 +1158,23 @@ When no [Page.Dialog](/api/class-page.mdx#page-event-dialog) or [BrowserContext.

---

### event DialogClosed {/* #browser-context-event-dialog-closed */}

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

Emitted when a JavaScript dialog in any page belonging to this context has been closed, either by [Dialog.AcceptAsync()](/api/class-dialog.mdx#dialog-accept), by [Dialog.DismissAsync()](/api/class-dialog.mdx#dialog-dismiss), or manually by the user in the headed browser.

**Usage**

```csharp
BrowserContext.DialogClosed += async (_, dialog) => {};
```

**Event data**
- [Dialog]

---

### event Download {/* #browser-context-event-download */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.60</font><x-search>browserContext.event Download</x-search>
Expand Down
4 changes: 3 additions & 1 deletion dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `Headless` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-headless"/><a href="#browser-type-launch-persistent-context-option-headless" class="list-anchor">#</a>

Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
- `HttpCredentials` HttpCredentials? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-http-credentials"/><a href="#browser-type-launch-persistent-context-option-http-credentials" class="list-anchor">#</a>
- `HttpCredentials|HttpCredentialsList` HttpCredentials|HttpCredentialsList? | [IEnumerable]?&lt;HttpCredentials|HttpCredentialsList&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-http-credentials"/><a href="#browser-type-launch-persistent-context-option-http-credentials" class="list-anchor">#</a>
- `Username` [string]


Expand All @@ -435,6 +435,8 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.

Pass an array to use different credentials for different origins. The first entry that matches the request origin is used, and entries with no origin match any request.
- `IgnoreAllDefaultArgs` [bool]? *(optional)* <font size="2">Added in: v1.9</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-ignore-all-default-args"/><a href="#browser-type-launch-persistent-context-option-ignore-all-default-args" class="list-anchor">#</a>

If `true`, Playwright does not pass its own configurations args and only uses the ones from [Args](/api/class-browsertype.mdx#browser-type-launch-persistent-context-option-args). Dangerous option; use with care. Defaults to `false`.
Expand Down
22 changes: 22 additions & 0 deletions dotnet/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,28 @@ Frame.ParentFrame

---

### PierceFrames {/* #frame-pierce-frames */}

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

When working with iframes, you can create a frame locator that will search for elements in this frame and in all iframes inside it, so that you don't need to locate each iframe first.

Note that all elements matching the locator must belong to a single frame. For example, if the frame contains two iframes, each with a `Submit` button, piercing frames and locating a button will throw an error because it matches elements from multiple frames.

**Usage**

Following snippet locates a button, either in the frame or in one of the iframes inside it:

```csharp
var locator = frame.PierceFrames.GetByRole(AriaRole.Button);
await locator.ClickAsync();
```

**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>

---

### SetContentAsync {/* #frame-set-content */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>frame.SetContentAsync</x-search>
Expand Down
43 changes: 41 additions & 2 deletions dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ Navigate to the previous page in history.

:::warning

**Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
**Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
:::

**Usage**
Expand Down Expand Up @@ -1253,7 +1253,7 @@ Navigate to the next page in history.

:::warning

**Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
**Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
:::

**Usage**
Expand Down Expand Up @@ -1626,6 +1626,28 @@ Console.WriteLine(locator);

---

### PierceFrames {/* #page-pierce-frames */}

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

When working with iframes, you can create a frame locator that will search for elements in the main frame and in all iframes on the page, so that you don't need to locate each iframe first.

Note that all elements matching the locator must belong to a single frame. For example, if the page contains two iframes, each with a `Submit` button, piercing frames and locating a button will throw an error because it matches elements from multiple frames.

**Usage**

Following snippet locates a button, either in the main frame or in one of the iframes:

```csharp
var locator = page.PierceFrames.GetByRole(AriaRole.Button);
await locator.ClickAsync();
```

**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>

---

### ReloadAsync {/* #page-reload */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.ReloadAsync</x-search>
Expand Down Expand Up @@ -3142,6 +3164,23 @@ When no [Page.Dialog](/api/class-page.mdx#page-event-dialog) or [BrowserContext.

---

### event DialogClosed {/* #page-event-dialog-closed */}

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

Emitted when a JavaScript dialog has been closed, either by [Dialog.AcceptAsync()](/api/class-dialog.mdx#dialog-accept), by [Dialog.DismissAsync()](/api/class-dialog.mdx#dialog-dismiss), or manually by the user in the headed browser.

**Usage**

```csharp
Page.DialogClosed += async (_, dialog) => {};
```

**Event data**
- [Dialog]

---

### event DOMContentLoaded {/* #page-event-dom-content-loaded */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.9</font><x-search>page.event DOMContentLoaded</x-search>
Expand Down
4 changes: 3 additions & 1 deletion java/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ APIRequest.newContext(options);
- `setFailOnStatusCode` [boolean] *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-fail-on-status-code"/><a href="#api-request-new-context-option-fail-on-status-code" class="list-anchor">#</a>

Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
- `setHttpCredentials` HttpCredentials *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-http-credentials"/><a href="#api-request-new-context-option-http-credentials" class="list-anchor">#</a>
- `setHttpCredentials` HttpCredentials | [List]&lt;HttpCredentials&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-http-credentials"/><a href="#api-request-new-context-option-http-credentials" class="list-anchor">#</a>
- `setUsername` [String]


Expand All @@ -95,6 +95,8 @@ APIRequest.newContext(options);
This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.

Pass an array to use different credentials for different origins. The first entry that matches the request origin is used, and entries with no origin match any request.
- `setIgnoreHTTPSErrors` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-ignore-https-errors"/><a href="#api-request-new-context-option-ignore-https-errors" class="list-anchor">#</a>

Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
Expand Down
Loading
Loading