Skip to content
Closed
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
Binary file added dotnet/versioned_docs/images/timeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 5 additions & 18 deletions dotnet/versioned_docs/version-stable/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ 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.
- `IsLocal` [bool]? *(optional)* <font size="2">Added in: v1.58</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-is-local"/><a href="#browser-type-connect-over-cdp-option-is-local" class="list-anchor">#</a>

Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
- `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 Expand Up @@ -187,14 +190,6 @@ var browser = await playwright.Chromium.LaunchAsync(new() {
- `ChromiumSandbox` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-chromium-sandbox"/><a href="#browser-type-launch-option-chromium-sandbox" class="list-anchor">#</a>

Enable Chromium sandboxing. Defaults to `false`.
- `Devtools` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-devtools"/><a href="#browser-type-launch-option-devtools" class="list-anchor">#</a>

:::warning[Deprecated]
Use [debugging tools](../debug.mdx) instead.
:::


**Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the [Headless](/api/class-browsertype.mdx#browser-type-launch-option-headless) option will be set `false`.
- `DownloadsPath` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-downloads-path"/><a href="#browser-type-launch-option-downloads-path" class="list-anchor">#</a>

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
Expand All @@ -220,7 +215,7 @@ var browser = await playwright.Chromium.LaunchAsync(new() {
Close the browser process on SIGTERM. Defaults to `true`.
- `Headless` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-headless"/><a href="#browser-type-launch-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` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`.
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`.
- `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-option-ignore-all-default-args"/><a href="#browser-type-launch-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-option-args). Dangerous option; use with care. Defaults to `false`.
Expand Down Expand Up @@ -364,14 +359,6 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `DeviceScaleFactor` [float]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-device-scale-factor"/><a href="#browser-type-launch-persistent-context-option-device-scale-factor" class="list-anchor">#</a>

Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
- `Devtools` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-devtools"/><a href="#browser-type-launch-persistent-context-option-devtools" class="list-anchor">#</a>

:::warning[Deprecated]
Use [debugging tools](../debug.mdx) instead.
:::


**Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the [Headless](/api/class-browsertype.mdx#browser-type-launch-persistent-context-option-headless) option will be set `false`.
- `DownloadsPath` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-downloads-path"/><a href="#browser-type-launch-persistent-context-option-downloads-path" class="list-anchor">#</a>

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
Expand Down Expand Up @@ -416,7 +403,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices).
- `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` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`.
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>
- `Username` [string]

Expand Down
2 changes: 1 addition & 1 deletion dotnet/versioned_docs/version-stable/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ await button.ClickAsync();

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

Returns locator description previously set with [Locator.Describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
Returns locator description previously set with [Locator.Describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set.

**Usage**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Let's see how we can use the assertion:

```csharp
// ✓ Contains the right items in the right order
await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});
await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3"});

// ✖ Wrong order
await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});
Expand Down
4 changes: 3 additions & 1 deletion dotnet/versioned_docs/version-stable/api/class-route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ The [Headers](/api/class-route.mdx#route-continue-option-headers) option applies

:::warning

The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [BrowserContext.AddCookiesAsync()](/api/class-browsercontext.mdx#browser-context-add-cookies).
Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`, `Content-Length` and others, see [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list). If an override is provided for a forbidden header, it will be ignored and the original request header will be used.

To set custom cookies, use [BrowserContext.AddCookiesAsync()](/api/class-browsercontext.mdx#browser-context-add-cookies).
:::

---
Expand Down
18 changes: 18 additions & 0 deletions dotnet/versioned_docs/version-stable/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,24 @@ This makes `hostmachine` point to the host's localhost. Your tests should use `h
When running tests remotely, ensure the Playwright version in your tests matches the version running in the Docker container.
:::

### Connecting using noVNC and GitHub Codespaces

For Docker and GitHub Codespaces environments, you can view and generate tests using the `noVNC` viewer built into the Docker image. In order for the VNC webviewer to be accessible outside of the container, you can enable the `desktop-lite` feature and specify the `webPort` in your `.devcontainer/devcontainer.json` file:

```json
{
"image": "mcr.microsoft.com/playwright:v1.57.0",
"forwardPorts": [6080],
"features": {
"desktop-lite": {
"webPort": "6080"
}
}
}
```

Once this is enabled you can open the port specified in a new browser tab and you will have access to the `noVNC` web viewer. This will enable you to record tests, pick selectors, and use codegen directly on your container.

## Image tags

See [all available image tags].
Expand Down
2 changes: 1 addition & 1 deletion dotnet/versioned_docs/version-stable/locators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ Alternatively, filter by **not having** text:

```csharp
// 5 in-stock items
await Expect(Page.getByRole(AriaRole.Listitem).Filter(new() { HasNotText = "Out of stock" }))
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasNotText = "Out of stock" }))
.ToHaveCountAsync(5);
```

Expand Down
Binary file added java/versioned_docs/images/timeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 5 additions & 18 deletions java/versioned_docs/version-stable/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ 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.
- `setIsLocal` [boolean] *(optional)* <font size="2">Added in: v1.58</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-is-local"/><a href="#browser-type-connect-over-cdp-option-is-local" class="list-anchor">#</a>

Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
- `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 Expand Up @@ -186,14 +189,6 @@ Browser browser = chromium.launch(new BrowserType.LaunchOptions()
- `setChromiumSandbox` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-chromium-sandbox"/><a href="#browser-type-launch-option-chromium-sandbox" class="list-anchor">#</a>

Enable Chromium sandboxing. Defaults to `false`.
- `setDevtools` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-devtools"/><a href="#browser-type-launch-option-devtools" class="list-anchor">#</a>

:::warning[Deprecated]
Use [debugging tools](../debug.mdx) instead.
:::


**Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the [setHeadless](/api/class-browsertype.mdx#browser-type-launch-option-headless) option will be set `false`.
- `setDownloadsPath` [Path] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-downloads-path"/><a href="#browser-type-launch-option-downloads-path" class="list-anchor">#</a>

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
Expand All @@ -219,7 +214,7 @@ Browser browser = chromium.launch(new BrowserType.LaunchOptions()
Close the browser process on SIGTERM. Defaults to `true`.
- `setHeadless` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-headless"/><a href="#browser-type-launch-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` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`.
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`.
- `setIgnoreAllDefaultArgs` [boolean] *(optional)* <font size="2">Added in: v1.9</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-option-ignore-all-default-args"/><a href="#browser-type-launch-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 [setArgs](/api/class-browsertype.mdx#browser-type-launch-option-args). Dangerous option; use with care. Defaults to `false`.
Expand Down Expand Up @@ -364,14 +359,6 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setDeviceScaleFactor` [double] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-device-scale-factor"/><a href="#browser-type-launch-persistent-context-option-device-scale-factor" class="list-anchor">#</a>

Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
- `setDevtools` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-devtools"/><a href="#browser-type-launch-persistent-context-option-devtools" class="list-anchor">#</a>

:::warning[Deprecated]
Use [debugging tools](../debug.mdx) instead.
:::


**Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the [setHeadless](/api/class-browsertype.mdx#browser-type-launch-persistent-context-option-headless) option will be set `false`.
- `setDownloadsPath` [Path] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-downloads-path"/><a href="#browser-type-launch-persistent-context-option-downloads-path" class="list-anchor">#</a>

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
Expand Down Expand Up @@ -416,7 +403,7 @@ BrowserType.launchPersistentContext(userDataDir, options);
Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices).
- `setHeadless` [boolean] *(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` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`.
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`.
- `setHttpCredentials` 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>
- `setUsername` [String]

Expand Down
2 changes: 1 addition & 1 deletion java/versioned_docs/version-stable/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ button.click();

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

Returns locator description previously set with [Locator.describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
Returns locator description previously set with [Locator.describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set.

**Usage**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Let's see how we can use the assertion:

```java
// ✓ Contains the right items in the right order
assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3"});

// ✖ Wrong order
assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
Expand Down
4 changes: 3 additions & 1 deletion java/versioned_docs/version-stable/api/class-route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ The [setHeaders](/api/class-route.mdx#route-continue-option-headers) option appl

:::warning

The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [BrowserContext.addCookies()](/api/class-browsercontext.mdx#browser-context-add-cookies).
Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`, `Content-Length` and others, see [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list). If an override is provided for a forbidden header, it will be ignored and the original request header will be used.

To set custom cookies, use [BrowserContext.addCookies()](/api/class-browsercontext.mdx#browser-context-add-cookies).
:::


Expand Down
Loading