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-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ await ApiRequest.NewContextAsync(options);

**Arguments**
- `options` `ApiRequestNewContextOptions?` *(optional)*
- `ApiRequestFailsOnErrorStatus` [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-api-request-fails-on-error-status"/><a href="#api-request-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `BaseURL` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-base-url"/><a href="#api-request-new-context-option-base-url" class="list-anchor">#</a>

Methods like [ApiRequestContext.GetAsync()](/api/class-apirequestcontext.mdx#api-request-context-get) take the base URL into consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Examples:
Expand Down
6 changes: 6 additions & 0 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ await browser.CloseAsync();
- `AcceptDownloads` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-accept-downloads"/><a href="#browser-new-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `ApiRequestFailsOnErrorStatus` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-api-request-fails-on-error-status"/><a href="#browser-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `BaseURL` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-base-url"/><a href="#browser-new-context-option-base-url" class="list-anchor">#</a>

When using [Page.GotoAsync()](/api/class-page.mdx#page-goto), [Page.RouteAsync()](/api/class-page.mdx#page-route), [Page.WaitForURLAsync()](/api/class-page.mdx#page-wait-for-url), [Page.RunAndWaitForRequestAsync()](/api/class-page.mdx#page-wait-for-request), or [Page.RunAndWaitForResponseAsync()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
Expand Down Expand Up @@ -384,6 +387,9 @@ await Browser.NewPageAsync(options);
- `AcceptDownloads` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-accept-downloads"/><a href="#browser-new-page-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `ApiRequestFailsOnErrorStatus` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-api-request-fails-on-error-status"/><a href="#browser-new-page-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `BaseURL` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-base-url"/><a href="#browser-new-page-option-base-url" class="list-anchor">#</a>

When using [Page.GotoAsync()](/api/class-page.mdx#page-goto), [Page.RouteAsync()](/api/class-page.mdx#page-route), [Page.WaitForURLAsync()](/api/class-page.mdx#page-wait-for-url), [Page.RunAndWaitForRequestAsync()](/api/class-page.mdx#page-wait-for-request), or [Page.RunAndWaitForResponseAsync()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
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 @@ -277,6 +277,9 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `AcceptDownloads` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-accept-downloads"/><a href="#browser-type-launch-persistent-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `ApiRequestFailsOnErrorStatus` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-api-request-fails-on-error-status"/><a href="#browser-type-launch-persistent-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `Args` [IEnumerable]?&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-args"/><a href="#browser-type-launch-persistent-context-option-args" class="list-anchor">#</a>

:::warning
Expand Down
3 changes: 3 additions & 0 deletions java/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ APIRequest.newContext(options);

**Arguments**
- `options` `ApiRequest.NewContextOptions` *(optional)*
- `setApiRequestFailsOnErrorStatus` [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-api-request-fails-on-error-status"/><a href="#api-request-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `setBaseURL` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-base-url"/><a href="#api-request-new-context-option-base-url" class="list-anchor">#</a>

Methods like [APIRequestContext.get()](/api/class-apirequestcontext.mdx#api-request-context-get) take the base URL into consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Examples:
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 @@ -170,6 +170,9 @@ browser.close();
- `setAcceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-accept-downloads"/><a href="#browser-new-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `setApiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-api-request-fails-on-error-status"/><a href="#browser-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `setBaseURL` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-base-url"/><a href="#browser-new-context-option-base-url" class="list-anchor">#</a>

When using [Page.navigate()](/api/class-page.mdx#page-goto), [Page.route()](/api/class-page.mdx#page-route), [Page.waitForURL()](/api/class-page.mdx#page-wait-for-url), [Page.waitForRequest()](/api/class-page.mdx#page-wait-for-request), or [Page.waitForResponse()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
Expand Down Expand Up @@ -389,6 +392,9 @@ Browser.newPage(options);
- `setAcceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-accept-downloads"/><a href="#browser-new-page-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `setApiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-api-request-fails-on-error-status"/><a href="#browser-new-page-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `setBaseURL` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-base-url"/><a href="#browser-new-page-option-base-url" class="list-anchor">#</a>

When using [Page.navigate()](/api/class-page.mdx#page-goto), [Page.route()](/api/class-page.mdx#page-route), [Page.waitForURL()](/api/class-page.mdx#page-wait-for-url), [Page.waitForRequest()](/api/class-page.mdx#page-wait-for-request), or [Page.waitForResponse()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
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 @@ -277,6 +277,9 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setAcceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-accept-downloads"/><a href="#browser-type-launch-persistent-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `setApiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-api-request-fails-on-error-status"/><a href="#browser-type-launch-persistent-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `setArgs` [List]&lt;[String]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-args"/><a href="#browser-type-launch-persistent-context-option-args" class="list-anchor">#</a>

:::warning
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 @@ -199,6 +199,9 @@ await androidDevice.launchBrowser(options);
- `acceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-accept-downloads"/><a href="#android-device-launch-browser-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `apiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-api-request-fails-on-error-status"/><a href="#android-device-launch-browser-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `args` [Array]&lt;[string]&gt; *(optional)* <font size="2">Added in: v1.29</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="android-device-launch-browser-option-args"/><a href="#android-device-launch-browser-option-args" class="list-anchor">#</a>

:::warning
Expand Down
3 changes: 3 additions & 0 deletions nodejs/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ await apiRequest.newContext(options);

**Arguments**
- `options` [Object] *(optional)*
- `apiRequestFailsOnErrorStatus` [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-api-request-fails-on-error-status"/><a href="#api-request-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `baseURL` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-base-url"/><a href="#api-request-new-context-option-base-url" class="list-anchor">#</a>

Methods like [apiRequestContext.get()](/api/class-apirequestcontext.mdx#api-request-context-get) take the base URL into consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Examples:
Expand Down
6 changes: 6 additions & 0 deletions nodejs/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ If directly using this method to create [BrowserContext]s, it is best practice t
- `acceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-accept-downloads"/><a href="#browser-new-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `apiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-api-request-fails-on-error-status"/><a href="#browser-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `baseURL` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-base-url"/><a href="#browser-new-context-option-base-url" class="list-anchor">#</a>

When using [page.goto()](/api/class-page.mdx#page-goto), [page.route()](/api/class-page.mdx#page-route), [page.waitForURL()](/api/class-page.mdx#page-wait-for-url), [page.waitForRequest()](/api/class-page.mdx#page-wait-for-request), or [page.waitForResponse()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
Expand Down Expand Up @@ -509,6 +512,9 @@ await browser.newPage(options);
- `acceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-accept-downloads"/><a href="#browser-new-page-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `apiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-api-request-fails-on-error-status"/><a href="#browser-new-page-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `baseURL` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-base-url"/><a href="#browser-new-page-option-base-url" class="list-anchor">#</a>

When using [page.goto()](/api/class-page.mdx#page-goto), [page.route()](/api/class-page.mdx#page-route), [page.waitForURL()](/api/class-page.mdx#page-wait-for-url), [page.waitForRequest()](/api/class-page.mdx#page-wait-for-request), or [page.waitForResponse()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
Expand Down
3 changes: 3 additions & 0 deletions nodejs/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ await browserType.launchPersistentContext(userDataDir, options);
- `acceptDownloads` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-accept-downloads"/><a href="#browser-type-launch-persistent-context-option-accept-downloads" class="list-anchor">#</a>

Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `apiRequestFailsOnErrorStatus` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-api-request-fails-on-error-status"/><a href="#browser-type-launch-persistent-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `args` [Array]&lt;[string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-args"/><a href="#browser-type-launch-persistent-context-option-args" class="list-anchor">#</a>

:::warning
Expand Down
26 changes: 26 additions & 0 deletions nodejs/docs/api/class-testoptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,32 @@ export default defineConfig({

---

### pageSnapshot {#test-options-page-snapshot}

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

Whether to automatically capture a ARIA snapshot of the page after each test. Defaults to `'only-on-failure'`.
* `'off'`: Do not capture page snapshots.
* `'on'`: Capture page snapshot after each test.
* `'only-on-failure'`: Capture page snapshot after each test failure.

**Usage**

```js title="playwright.config.ts"
import { defineConfig } from '@playwright/test';

export default defineConfig({
use: {
pageSnapshot: 'on',
},
});
```

**Type**
- "off" | "on" | "only-on-failure"

---

### permissions {#test-options-permissions}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.10</font><x-search>testOptions.permissions</x-search>
Expand Down
3 changes: 3 additions & 0 deletions python/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ api_request.new_context(**kwargs)
```

**Arguments**
- `api_request_fails_on_error_status` [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-api-request-fails-on-error-status"/><a href="#api-request-new-context-option-api-request-fails-on-error-status" class="list-anchor">#</a>

An object containing an option to throw an error when API request returns status codes other than 2xx and 3xx. By default, response object is returned for all status codes.
- `base_url` [str] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-base-url"/><a href="#api-request-new-context-option-base-url" class="list-anchor">#</a>

Methods like [api_request_context.get()](/api/class-apirequestcontext.mdx#api-request-context-get) take the base URL into consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Examples:
Expand Down
Loading
Loading