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
6 changes: 0 additions & 6 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -921,12 +921,6 @@ await BrowserContext.StorageStateAsync(options);
- `IndexedDB` [bool]? *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `Path` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [Path](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
30 changes: 30 additions & 0 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ await BrowserType.ConnectAsync(wsEndpoint, options);
- `Headers` [IDictionary]?&lt;[string], [string]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-headers"/><a href="#browser-type-connect-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with web socket connect request. Optional.
- `Proxy` Proxy? *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-proxy"/><a href="#browser-type-connect-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `Bypass` [string]? *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `Username` [string]? *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `Password` [string]? *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `SlowMo` [float]? *(optional)* <font size="2">Added in: v1.10</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-slow-mo"/><a href="#browser-type-connect-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down Expand Up @@ -116,6 +131,21 @@ var page = defaultContext.Pages[0];
- `Headers` [IDictionary]?&lt;[string], [string]&gt; *(optional)* <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-headers"/><a href="#browser-type-connect-over-cdp-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with connect request. Optional.
- `Proxy` Proxy? *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-proxy"/><a href="#browser-type-connect-over-cdp-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `Bypass` [string]? *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `Username` [string]? *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `Password` [string]? *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `SlowMo` [float]? *(optional)* <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-slow-mo"/><a href="#browser-type-connect-over-cdp-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/pom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.
Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.

A page object represents a part of your web application. An e-commerce web application might have a home page, a listings page and a checkout page. Each of them can be represented by page object models.

Expand Down
6 changes: 0 additions & 6 deletions java/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,6 @@ BrowserContext.storageState(options);
- `setIndexedDB` [boolean] *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `setPath` [Path] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [setPath](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
30 changes: 30 additions & 0 deletions java/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ BrowserType.connect(wsEndpoint, options);
- `setHeaders` [Map]&lt;[String], [String]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-headers"/><a href="#browser-type-connect-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with web socket connect request. Optional.
- `setProxy` Proxy *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-proxy"/><a href="#browser-type-connect-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `setBypass` [String] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `setUsername` [String] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `setPassword` [String] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `setSlowMo` [double] *(optional)* <font size="2">Added in: v1.10</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-slow-mo"/><a href="#browser-type-connect-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down Expand Up @@ -115,6 +130,21 @@ Page page = defaultContext.pages().get(0);
- `setHeaders` [Map]&lt;[String], [String]&gt; *(optional)* <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-headers"/><a href="#browser-type-connect-over-cdp-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with connect request. Optional.
- `setProxy` Proxy *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-proxy"/><a href="#browser-type-connect-over-cdp-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `setBypass` [String] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `setUsername` [String] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `setPassword` [String] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `setSlowMo` [double] *(optional)* <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-slow-mo"/><a href="#browser-type-connect-over-cdp-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down
2 changes: 1 addition & 1 deletion java/docs/pom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.
Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.

A page object represents a part of your web application. An e-commerce web application might have a home page, a listings page and a checkout page. Each of them can be represented by page object models.

Expand Down
7 changes: 3 additions & 4 deletions nodejs/docs/accessibility-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ type AxeFixture = {
// This new "test" can be used in multiple test files, and each of them will get
// a consistently configured AxeBuilder instance.
export const test = base.extend<AxeFixture>({
makeAxeBuilder: async ({ page }, use, testInfo) => {
makeAxeBuilder: async ({ page }, use) => {
const makeAxeBuilder = () => new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.exclude('#commonly-reused-element-with-known-issue');
Expand All @@ -289,8 +289,7 @@ export { expect } from '@playwright/test';
</TabItem>
<TabItem value="js">

```js
// axe-test.js
```js title="axe-test.js"
const base = require('@playwright/test');
const AxeBuilder = require('@axe-core/playwright').default;

Expand All @@ -299,7 +298,7 @@ const AxeBuilder = require('@axe-core/playwright').default;
// This new "test" can be used in multiple test files, and each of them will get
// a consistently configured AxeBuilder instance.
exports.test = base.test.extend({
makeAxeBuilder: async ({ page }, use, testInfo) => {
makeAxeBuilder: async ({ page }, use) => {
const makeAxeBuilder = () => new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.exclude('#commonly-reused-element-with-known-issue');
Expand Down
2 changes: 1 addition & 1 deletion nodejs/docs/api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ test('last created issue should be on the server', async ({ page }) => {
await page.getByRole('textbox', { name: 'Title' }).fill('Bug report 1');
await page.getByRole('textbox', { name: 'Comment body' }).fill('Bug description');
await page.getByText('Submit new issue').click();
const issueId = page.url().substr(page.url().lastIndexOf('/'));
const issueId = new URL(page.url()).pathname.split('/').pop();

const newIssue = await apiContext.get(
`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`
Expand Down
6 changes: 0 additions & 6 deletions nodejs/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -861,12 +861,6 @@ await browserContext.storageState(options);
- `indexedDB` [boolean] *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `path` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [path](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
30 changes: 30 additions & 0 deletions nodejs/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ await browserType.connect(wsEndpoint, options);
- `logger` [Logger] *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-logger"/><a href="#browser-type-connect-option-logger" class="list-anchor">#</a>

Logger sink for Playwright logging. Optional.
- `proxy` [Object] *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-proxy"/><a href="#browser-type-connect-option-proxy" class="list-anchor">#</a>
- `server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `bypass` [string] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `username` [string] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `password` [string] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `slowMo` [number] *(optional)* <font size="2">Added in: v1.10</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-slow-mo"/><a href="#browser-type-connect-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down Expand Up @@ -119,6 +134,21 @@ const page = defaultContext.pages()[0];
- `logger` [Logger] *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-logger"/><a href="#browser-type-connect-over-cdp-option-logger" class="list-anchor">#</a>

Logger sink for Playwright logging. Optional.
- `proxy` [Object] *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-proxy"/><a href="#browser-type-connect-over-cdp-option-proxy" class="list-anchor">#</a>
- `server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `bypass` [string] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `username` [string] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `password` [string] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `slowMo` [number] *(optional)* <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-slow-mo"/><a href="#browser-type-connect-over-cdp-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down
13 changes: 12 additions & 1 deletion nodejs/docs/api/class-test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,18 @@ Learn more about the execution modes [here](../test-parallel.mdx).
test('runs in parallel 2', async ({ page }) => {});
```

* Running tests serially, retrying from the start.
* Running tests in order, retrying each failed test independetly.

This is the default mode. It can be useful to set it explicitly to override project configuration that uses `fullyParallel`.

```js
// Tests in this file run in order. Retries, if any, run independently.
test.describe.configure({ mode: 'default' });
test('runs first', async ({ page }) => {});
test('runs second', async ({ page }) => {});
```

* Running tests serially, retrying from the start. If one of the serial tests fails, all subsequent tests are skipped.

:::note

Expand Down
6 changes: 4 additions & 2 deletions nodejs/docs/api/class-testcase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ testCase.titlePath();

The list of annotations applicable to the current test. Includes:
* annotations defined on the test or suite via [test()](/api/class-test.mdx#test-call) and [test.describe()](/api/class-test.mdx#test-describe);
* annotations implicitly added by methods [test.skip()](/api/class-test.mdx#test-skip), [test.fixme()](/api/class-test.mdx#test-fixme) and [test.fail()](/api/class-test.mdx#test-fail);
* annotations appended to [testInfo.annotations](/api/class-testinfo.mdx#test-info-annotations) during the test execution.
* annotations implicitly added by methods [test.skip()](/api/class-test.mdx#test-skip), [test.fixme()](/api/class-test.mdx#test-fixme) and [test.fail()](/api/class-test.mdx#test-fail) prior to test execution.

Annotations are available during test execution through [testInfo.annotations](/api/class-testinfo.mdx#test-info-annotations).

Expand All @@ -96,6 +95,9 @@ testCase.annotations
- `description` [string] *(optional)*

Optional description.
- `location` [Location] *(optional)*

Optional location in the source where the annotation is added.

---

Expand Down
3 changes: 3 additions & 0 deletions nodejs/docs/api/class-testinfo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ testInfo.annotations
- `description` [string] *(optional)*

Optional description.
- `location` [Location] *(optional)*

Optional location in the source where the annotation is added.

---

Expand Down
Loading
Loading