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: 1 addition & 1 deletion dotnet/docs/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ await ApiRequest.NewContextAsync(options);
* baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
* baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in `http://localhost:3000/foo/bar.html`
* baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in `http://localhost:3000/bar.html`
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: 1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-client-certificates"/><a href="#api-request-new-context-option-client-certificates" class="list-anchor">#</a>
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-client-certificates"/><a href="#api-request-new-context-option-client-certificates" class="list-anchor">#</a>
- `Origin` [string]

Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
Expand Down
14 changes: 10 additions & 4 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ await browser.CloseAsync();
- `BypassCSP` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-bypass-csp"/><a href="#browser-new-context-option-bypass-csp" class="list-anchor">#</a>

Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: 1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-client-certificates"/><a href="#browser-new-context-option-client-certificates" class="list-anchor">#</a>
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-client-certificates"/><a href="#browser-new-context-option-client-certificates" class="list-anchor">#</a>
- `Origin` [string]

Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
Expand Down Expand Up @@ -301,7 +301,7 @@ await browser.CloseAsync();
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-is-mobile"/><a href="#browser-new-context-option-is-mobile" class="list-anchor">#</a>

Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-java-script-enabled"/><a href="#browser-new-context-option-java-script-enabled" class="list-anchor">#</a>

Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
Expand Down Expand Up @@ -345,6 +345,9 @@ await browser.CloseAsync();
- `RecordVideoDir` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-video-dir"/><a href="#browser-new-context-option-record-video-dir" class="list-anchor">#</a>

Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
- `RecordVideoFps` [int]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-video-fps"/><a href="#browser-new-context-option-record-video-fps" class="list-anchor">#</a>

Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-video-size"/><a href="#browser-new-context-option-record-video-size" class="list-anchor">#</a>
- `Width` [int]

Expand Down Expand Up @@ -434,7 +437,7 @@ await Browser.NewPageAsync(options);
- `BypassCSP` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-bypass-csp"/><a href="#browser-new-page-option-bypass-csp" class="list-anchor">#</a>

Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: 1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-client-certificates"/><a href="#browser-new-page-option-client-certificates" class="list-anchor">#</a>
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-client-certificates"/><a href="#browser-new-page-option-client-certificates" class="list-anchor">#</a>
- `Origin` [string]

Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
Expand Down Expand Up @@ -526,7 +529,7 @@ await Browser.NewPageAsync(options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-is-mobile"/><a href="#browser-new-page-option-is-mobile" class="list-anchor">#</a>

Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-java-script-enabled"/><a href="#browser-new-page-option-java-script-enabled" class="list-anchor">#</a>

Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
Expand Down Expand Up @@ -570,6 +573,9 @@ await Browser.NewPageAsync(options);
- `RecordVideoDir` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-video-dir"/><a href="#browser-new-page-option-record-video-dir" class="list-anchor">#</a>

Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
- `RecordVideoFps` [int]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-video-fps"/><a href="#browser-new-page-option-record-video-fps" class="list-anchor">#</a>

Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-video-size"/><a href="#browser-new-page-option-record-video-size" class="list-anchor">#</a>
- `Width` [int]

Expand Down
7 changes: 5 additions & 2 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `ChromiumSandbox` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-chromium-sandbox"/><a href="#browser-type-launch-persistent-context-option-chromium-sandbox" class="list-anchor">#</a>

Enable Chromium sandboxing. Defaults to `false`.
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: 1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-client-certificates"/><a href="#browser-type-launch-persistent-context-option-client-certificates" class="list-anchor">#</a>
- `ClientCertificates` [IEnumerable]?&lt;ClientCertificates&gt; *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-client-certificates"/><a href="#browser-type-launch-persistent-context-option-client-certificates" class="list-anchor">#</a>
- `Origin` [string]

Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
Expand Down Expand Up @@ -451,7 +451,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-is-mobile"/><a href="#browser-type-launch-persistent-context-option-is-mobile" class="list-anchor">#</a>

Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-java-script-enabled"/><a href="#browser-type-launch-persistent-context-option-java-script-enabled" class="list-anchor">#</a>

Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
Expand Down Expand Up @@ -495,6 +495,9 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `RecordVideoDir` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-record-video-dir"/><a href="#browser-type-launch-persistent-context-option-record-video-dir" class="list-anchor">#</a>

Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
- `RecordVideoFps` [int]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-record-video-fps"/><a href="#browser-type-launch-persistent-context-option-record-video-fps" class="list-anchor">#</a>

Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-record-video-size"/><a href="#browser-type-launch-persistent-context-option-record-video-size" class="list-anchor">#</a>
- `Width` [int]

Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-cdpsession.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ await CdpSession.DetachAsync();

### Event {/* #cdp-session-event */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v.1.30</font><x-search>cdpSession.Event</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.30</font><x-search>cdpSession.Event</x-search>

Returns an event emitter for the given CDP event name.

Expand All @@ -60,7 +60,7 @@ CdpSession.Event(eventName);
```

**Arguments**
- `eventName` [string] <font size="2">Added in: v1.30</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="cdp-session-event-option-event-name"/><a href="#cdp-session-event-option-event-name" class="list-anchor">#</a>
- `eventName` [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="cdp-session-event-option-event-name"/><a href="#cdp-session-event-option-event-name" class="list-anchor">#</a>

CDP event name.

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/api/class-cdpsessionevent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Each object represents a named event and allows handling of the event when it is

### EventName {/* #cdp-session-event-event-name */}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: 1.30</font><x-search>cdpSessionEvent.EventName</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.30</font><x-search>cdpSessionEvent.EventName</x-search>

**Usage**

Expand Down
1 change: 1 addition & 0 deletions dotnet/docs/api/class-clock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ await page.Clock.FastForwardAsync("30:00");

Install fake implementations for the following time-related functions:
* `Date`
* `Temporal.Now`
* `setTimeout`
* `clearTimeout`
* `setInterval`
Expand Down
8 changes: 7 additions & 1 deletion dotnet/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,15 @@ Gets the full HTML contents of the frame, including the doctype.
**Usage**

```csharp
await Frame.ContentAsync();
await Frame.ContentAsync(options);
```

**Arguments**
- `options` `FrameContentOptions?` *(optional)*
- `IncludeShadow` [bool]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-content-option-include-shadow"/><a href="#frame-content-option-include-shadow" class="list-anchor">#</a>

When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `<template shadowrootmode="open">` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.

**Returns**
- [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-content-return"/><a href="#frame-content-return" class="list-anchor">#</a>

Expand Down
8 changes: 7 additions & 1 deletion dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,15 @@ Gets the full HTML contents of the page, including the doctype.
**Usage**

```csharp
await Page.ContentAsync();
await Page.ContentAsync(options);
```

**Arguments**
- `options` `PageContentOptions?` *(optional)*
- `IncludeShadow` [bool]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-content-option-include-shadow"/><a href="#page-content-option-include-shadow" class="list-anchor">#</a>

When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `<template shadowrootmode="open">` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.

**Returns**
- [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-content-return"/><a href="#page-content-return" class="list-anchor">#</a>

Expand Down
36 changes: 35 additions & 1 deletion dotnet/docs/api/class-screencast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,40 @@ await Screencast.ShowActionsAsync(options);
How long each annotation is displayed in milliseconds. Defaults to `500`.
- `FontSize` [int]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-show-actions-option-font-size"/><a href="#screencast-show-actions-option-font-size" class="list-anchor">#</a>

:::warning[Deprecated]
Use `title` in [Style](/api/class-screencast.mdx#screencast-show-actions-option-style) instead, for example `style: { title: 'font-size: 32px' }`.
:::


Font size of the action title in pixels. Defaults to `24`.
- `Position` `enum AnnotatePosition { TopLeft, Top, TopRight, BottomLeft, Bottom, BottomRight }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-show-actions-option-position"/><a href="#screencast-show-actions-option-position" class="list-anchor">#</a>

Position of the action title overlay. Defaults to `"top-right"`.

- `Style` Style? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-show-actions-option-style"/><a href="#screencast-show-actions-option-style" class="list-anchor">#</a>
- `Point` [string]? *(optional)*

CSS declarations for the marker at the action point. The marker is positioned at the action point, has zero size and is centered on the point, so its size and look come from this style. Not shown when omitted.
- `Highlight` [string]? *(optional)*

CSS declarations for the box that covers the target element. The box is positioned and sized to the element bounds. Not shown when omitted.
- `Title` [string]? *(optional)*

CSS declarations for the action title, for example `'font-size: 32px; background: #333'`. The title is placed according to [Position](/api/class-screencast.mdx#screencast-show-actions-option-position).

Styles of the action decorations. All decorations fade out over [Duration](/api/class-screencast.mdx#screencast-show-actions-option-duration).

**Usage**

```js
await page.screencast.showActions({
style: {
point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
title: 'font-size: 16px',
},
});
```

**Returns**
- [Disposable]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-show-actions-return"/><a href="#screencast-show-actions-return" class="list-anchor">#</a>

Expand Down Expand Up @@ -162,6 +191,11 @@ Starts the screencast. When [Path](/api/class-screencast.mdx#screencast-start-op

**Arguments**
- `options` `ScreencastStartOptions?` *(optional)*
- `Fps` [int]? *(optional)* <font size="2">Added in: v1.64</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-start-option-fps"/><a href="#screencast-start-option-fps" class="list-anchor">#</a>

Frame rate of the video recording in frames per second. Only used together with [Path](/api/class-screencast.mdx#screencast-start-option-path). Defaults to `25`.

Higher frame rates make animations and scrolling smoother at the cost of more CPU spent on encoding. Combine with [Size](/api/class-screencast.mdx#screencast-start-option-size) to record high resolution videos. The video can only contain as many distinct frames as the browser produces; Firefox and WebKit currently capture up to 25 frames per second.
- `OnFrame` [Func]&lt;[ScreencastFrame], [Task]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="screencast-start-option-on-frame"/><a href="#screencast-start-option-on-frame" class="list-anchor">#</a>
- `Data` [byte]&#91;&#93;

Expand Down
1 change: 1 addition & 0 deletions dotnet/docs/clock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The recommended approach is to use `setFixedTime` to set the time to a specific

[Page.Clock](/api/class-page.mdx#page-clock) overrides native global classes and functions related to time allowing them to be manually controlled:
- `Date`
- `Temporal.Now`
- `setTimeout`
- `clearTimeout`
- `setInterval`
Expand Down
Loading
Loading