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
17 changes: 17 additions & 0 deletions dotnet/docs/api/class-apirequestcontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,23 @@ await ApiRequestContext.StorageStateAsync(options);
**Returns**
- [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-storage-state-return"/><a href="#api-request-context-storage-state-return" class="list-anchor">#</a>

---

## Properties

### Tracing {#api-request-context-tracing}

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

**Usage**

```csharp
ApiRequestContext.Tracing
```

**Type**
- [Tracing]


[APIRequest]: /api/class-apirequest.mdx "APIRequest"
[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext"
Expand Down
9 changes: 0 additions & 9 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,6 @@ await page.GetByRole(AriaRole.Button).ClickAsync();
- `callback` [Action]&lt;BindingSource, T, [TResult]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-option-callback"/><a href="#browser-context-expose-binding-option-callback" class="list-anchor">#</a>

Callback function that will be called in the Playwright's context.
- `options` `BrowserContextExposeBindingOptions?` *(optional)*
- `Handle` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-option-handle"/><a href="#browser-context-expose-binding-option-handle" class="list-anchor">#</a>

:::warning[Deprecated]
This option will be removed in the future.
:::


Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.

**Returns**
- [Disposable]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-return"/><a href="#browser-context-expose-binding-return" class="list-anchor">#</a>
Expand Down
27 changes: 25 additions & 2 deletions dotnet/docs/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,23 @@ await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");

---

### HideHighlightAsync {#locator-hide-highlight}

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

Hide element highlight added with Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses [Locator.HighlightAsync()](/api/class-locator.mdx#locator-highlight).

**Usage**

```csharp
await Locator.HideHighlightAsync();
```

**Returns**
- [void]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-hide-highlight-return"/><a href="#locator-hide-highlight-return" class="list-anchor">#</a>

---

### HighlightAsync {#locator-highlight}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.20</font><x-search>locator.HighlightAsync</x-search>
Expand All @@ -1349,11 +1366,17 @@ Highlight the corresponding element(s) on the screen. Useful for debugging, don'
**Usage**

```csharp
await Locator.HighlightAsync();
await Locator.HighlightAsync(options);
```

**Arguments**
- `options` `LocatorHighlightOptions?` *(optional)*
- `Style` [string]? *(optional)* <font size="2">Added in: v1.60</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-highlight-option-style"/><a href="#locator-highlight-option-style" class="list-anchor">#</a>

Additional inline CSS applied to the highlight overlay, e.g. `"outline: 2px dashed red"`.

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

---

Expand Down
3 changes: 3 additions & 0 deletions dotnet/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ await Expect(locator).ToHaveCSSAsync("display", "flex");

CSS property value.
- `options` `LocatorAssertionsToHaveCSSOptions?` *(optional)*
- `Pseudo` `enum PseudoElement { Before, After }?` *(optional)* <font size="2">Added in: v1.60</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-assertions-to-have-css-option-pseudo"/><a href="#locator-assertions-to-have-css-option-pseudo" class="list-anchor">#</a>

Pseudo-element to read computed styles from.
- `Timeout` [float]? *(optional)* <font size="2">Added in: v1.18</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-assertions-to-have-css-option-timeout"/><a href="#locator-assertions-to-have-css-option-timeout" class="list-anchor">#</a>

Time to retry the assertion for in milliseconds. Defaults to `5000`.
Expand Down
26 changes: 17 additions & 9 deletions dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -702,15 +702,6 @@ class PageExamples
- `callback` [Action]&lt;BindingSource, T, [TResult]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-option-callback"/><a href="#page-expose-binding-option-callback" class="list-anchor">#</a>

Callback function that will be called in the Playwright's context.
- `options` `PageExposeBindingOptions?` *(optional)*
- `Handle` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-option-handle"/><a href="#page-expose-binding-option-handle" class="list-anchor">#</a>

:::warning[Deprecated]
This option will be removed in the future.
:::


Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.

**Returns**
- [Disposable]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-return"/><a href="#page-expose-binding-return" class="list-anchor">#</a>
Expand Down Expand Up @@ -1322,6 +1313,23 @@ await Page.GotoAsync(url, options);

---

### HideHighlightAsync {#page-hide-highlight}

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

Hide all locator highlight overlays previously added by [Locator.HighlightAsync()](/api/class-locator.mdx#locator-highlight) on this page.

**Usage**

```csharp
await Page.HideHighlightAsync();
```

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

---

### IsClosed {#page-is-closed}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.IsClosed</x-search>
Expand Down
54 changes: 54 additions & 0 deletions dotnet/docs/api/class-tracing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,43 @@ await context.Tracing.StopChunkAsync(new()

---

### StartHarAsync {#tracing-start-har}

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

Start recording a HAR (HTTP Archive) of network activity in this context. The HAR file is written to disk when [Tracing.StopHarAsync()](/api/class-tracing.mdx#tracing-stop-har) is called, or when the returned [Disposable] is disposed.

Only one HAR recording can be active at a time per [BrowserContext].

**Usage**

```csharp
await context.Tracing.StartHarAsync("trace.har");
var page = await context.NewPageAsync();
await page.GotoAsync("https://playwright.dev");
await context.Tracing.StopHarAsync();
```

**Arguments**
- `path` [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-start-har-option-path"/><a href="#tracing-start-har-option-path" class="list-anchor">#</a>

Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, the HAR is saved as a zip archive with response bodies attached as separate files.
- `options` `TracingStartHarOptions?` *(optional)*
- `Content` `enum HarContentPolicy { Omit, Embed, Attach }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-start-har-option-content"/><a href="#tracing-start-har-option-content" class="list-anchor">#</a>

Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output files and to `embed` for all other file extensions.
- `Mode` `enum HarMode { Full, Minimal }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-start-har-option-mode"/><a href="#tracing-start-har-option-mode" class="list-anchor">#</a>

When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
- `UrlFilter|UrlFilterRegex` [string]? | [Regex]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-start-har-option-url-filter"/><a href="#tracing-start-har-option-url-filter" class="list-anchor">#</a>

A glob or regex pattern to filter requests that are stored in the HAR. Defaults to none.

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

---

### StopAsync {#tracing-stop}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.12</font><x-search>tracing.StopAsync</x-search>
Expand Down Expand Up @@ -256,6 +293,23 @@ await Tracing.StopChunkAsync(options);
**Returns**
- [void]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-stop-chunk-return"/><a href="#tracing-stop-chunk-return" class="list-anchor">#</a>

---

### StopHarAsync {#tracing-stop-har}

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

Stop HAR recording and save the HAR file to the path given to [Tracing.StartHarAsync()](/api/class-tracing.mdx#tracing-start-har).

**Usage**

```csharp
await Tracing.StopHarAsync();
```

**Returns**
- [void]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="tracing-stop-har-return"/><a href="#tracing-stop-har-return" class="list-anchor">#</a>


[APIRequest]: /api/class-apirequest.mdx "APIRequest"
[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext"
Expand Down
17 changes: 17 additions & 0 deletions java/docs/api/class-apirequestcontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,23 @@ APIRequestContext.storageState(options);
**Returns**
- [String]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-storage-state-return"/><a href="#api-request-context-storage-state-return" class="list-anchor">#</a>

---

## Properties

### tracing() {#api-request-context-tracing}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.60</font><x-search>apiRequestContext.tracing()</x-search>

**Usage**

```java
APIRequestContext.tracing()
```

**Returns**
- [Tracing]


[APIRequest]: /api/class-apirequest.mdx "APIRequest"
[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext"
Expand Down
9 changes: 0 additions & 9 deletions java/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,6 @@ public class Example {
- `callback` `BindingCallback`<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-option-callback"/><a href="#browser-context-expose-binding-option-callback" class="list-anchor">#</a>

Callback function that will be called in the Playwright's context.
- `options` `BrowserContext.ExposeBindingOptions` *(optional)*
- `setHandle` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-option-handle"/><a href="#browser-context-expose-binding-option-handle" class="list-anchor">#</a>

:::warning[Deprecated]
This option will be removed in the future.
:::


Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.

**Returns**
- [Disposable]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-expose-binding-return"/><a href="#browser-context-expose-binding-return" class="list-anchor">#</a>
Expand Down
26 changes: 25 additions & 1 deletion java/docs/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,23 @@ assertThat(page.getByTitle("Issues count")).hasText("25 issues");

---

### hideHighlight {#locator-hide-highlight}

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

Hide element highlight added with Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses [Locator.highlight()](/api/class-locator.mdx#locator-highlight).

**Usage**

```java
Locator.hideHighlight();
```

**Returns**
- [void]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-hide-highlight-return"/><a href="#locator-hide-highlight-return" class="list-anchor">#</a>

---

### highlight {#locator-highlight}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.20</font><x-search>locator.highlight</x-search>
Expand All @@ -1350,10 +1367,17 @@ Highlight the corresponding element(s) on the screen. Useful for debugging, don'

```java
Locator.highlight();
Locator.highlight(options);
```

**Arguments**
- `options` `Locator.HighlightOptions` *(optional)*
- `setStyle` [String] *(optional)* <font size="2">Added in: v1.60</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-highlight-option-style"/><a href="#locator-highlight-option-style" class="list-anchor">#</a>

Additional inline CSS applied to the highlight overlay, e.g. `"outline: 2px dashed red"`.

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

---

Expand Down
3 changes: 3 additions & 0 deletions java/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ assertThat(page.getByRole(AriaRole.BUTTON)).hasCSS("display", "flex");

CSS property value.
- `options` `LocatorAssertions.HasCSSOptions` *(optional)*
- `setPseudo` `enum PseudoElement { BEFORE, AFTER }` *(optional)* <font size="2">Added in: v1.60</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-assertions-to-have-css-option-pseudo"/><a href="#locator-assertions-to-have-css-option-pseudo" class="list-anchor">#</a>

Pseudo-element to read computed styles from.
- `setTimeout` [double] *(optional)* <font size="2">Added in: v1.18</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-assertions-to-have-css-option-timeout"/><a href="#locator-assertions-to-have-css-option-timeout" class="list-anchor">#</a>

Time to retry the assertion for in milliseconds. Defaults to `5000`.
Expand Down
26 changes: 17 additions & 9 deletions java/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -706,15 +706,6 @@ public class Example {
- `callback` `BindingCallback`<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-option-callback"/><a href="#page-expose-binding-option-callback" class="list-anchor">#</a>

Callback function that will be called in the Playwright's context.
- `options` `Page.ExposeBindingOptions` *(optional)*
- `setHandle` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-option-handle"/><a href="#page-expose-binding-option-handle" class="list-anchor">#</a>

:::warning[Deprecated]
This option will be removed in the future.
:::


Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.

**Returns**
- [Disposable]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-expose-binding-return"/><a href="#page-expose-binding-return" class="list-anchor">#</a>
Expand Down Expand Up @@ -1274,6 +1265,23 @@ Page.goForward(options);

---

### hideHighlight {#page-hide-highlight}

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

Hide all locator highlight overlays previously added by [Locator.highlight()](/api/class-locator.mdx#locator-highlight) on this page.

**Usage**

```java
Page.hideHighlight();
```

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

---

### isClosed {#page-is-closed}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.isClosed</x-search>
Expand Down
Loading
Loading