Skip to content

Commit

Permalink
feat(roll): roll to 1.48 Playwright (#1553)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
playwrightmachine and github-actions[bot] authored Oct 8, 2024
1 parent 69def86 commit ba51b71
Show file tree
Hide file tree
Showing 389 changed files with 5,134 additions and 1,993 deletions.
1 change: 1 addition & 0 deletions dotnet/versioned_docs/version-stable/actionability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
1 change: 1 addition & 0 deletions dotnet/versioned_docs/version-stable/api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ var context = await Browser.NewContextAsync(new() { StorageState = state });
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ This method is deprecated. Please use other libraries such as [Axe](https://www.
Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.

:::note
The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Playwright will discard them as well for an easier to process tree, unless `interestingOnly` is set to `false`.

The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Playwright will discard them as well for an easier to process tree, unless [InterestingOnly](/api/class-accessibility.mdx#accessibility-snapshot-option-interesting-only) is set to `false`.
:::

**Usage**
Expand Down Expand Up @@ -105,6 +106,7 @@ Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(accessibilitySnapsho
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ await ApiRequest.NewContextAsync(options);
An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`, a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally, `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided with an exact match to the request origin that the certificate is valid for.

:::note
Using Client Certificates in combination with Proxy Servers is not supported.
:::

:::note
When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it work by replacing `localhost` with `local.playwright`.
:::

Expand Down Expand Up @@ -166,6 +163,7 @@ await ApiRequest.NewContextAsync(options);
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ await ApiRequestContext.DeleteAsync(url, options);

Target URL.
- `options` `ApiRequestContextDeleteOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.17</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-delete-option-data-data-byte-data-object"/><a href="#api-request-context-delete-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.17</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-delete-option-data"/><a href="#api-request-context-delete-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-delete-option-fail-on-status-code"/><a href="#api-request-context-delete-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -140,7 +140,7 @@ var data = new Dictionary<string, object>() {
await Request.FetchAsync("https://example.com/api/createBook", new() { Method = "post", DataObject = data });
```

The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data` encoding. Use [FormData] to construct request body and pass it to the request as `multipart` parameter:
The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data` encoding, by specifiying the `multipart` parameter:

```csharp
var file = new FilePayload()
Expand All @@ -159,7 +159,7 @@ await Request.FetchAsync("https://example.com/api/uploadScript", new() { Method

Target URL or Request to get all parameters from.
- `options` `ApiRequestContextFetchOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-data-data-byte-data-object"/><a href="#api-request-context-fetch-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-data"/><a href="#api-request-context-fetch-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-fail-on-status-code"/><a href="#api-request-context-fetch-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -229,7 +229,7 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query

Target URL.
- `options` `ApiRequestContextGetOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-get-option-data-data-byte-data-object"/><a href="#api-request-context-get-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-get-option-data"/><a href="#api-request-context-get-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-get-option-fail-on-status-code"/><a href="#api-request-context-get-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -289,7 +289,7 @@ await ApiRequestContext.HeadAsync(url, options);

Target URL.
- `options` `ApiRequestContextHeadOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-head-option-data-data-byte-data-object"/><a href="#api-request-context-head-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-head-option-data"/><a href="#api-request-context-head-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-head-option-fail-on-status-code"/><a href="#api-request-context-head-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -349,7 +349,7 @@ await ApiRequestContext.PatchAsync(url, options);

Target URL.
- `options` `ApiRequestContextPatchOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-data-data-byte-data-object"/><a href="#api-request-context-patch-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-data"/><a href="#api-request-context-patch-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-fail-on-status-code"/><a href="#api-request-context-patch-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -438,7 +438,7 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar

Target URL.
- `options` `ApiRequestContextPostOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-data-data-byte-data-object"/><a href="#api-request-context-post-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-data"/><a href="#api-request-context-post-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-fail-on-status-code"/><a href="#api-request-context-post-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -498,7 +498,7 @@ await ApiRequestContext.PutAsync(url, options);

Target URL.
- `options` `ApiRequestContextPutOptions?` *(optional)*
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-data-data-byte-data-object"/><a href="#api-request-context-put-option-data-data-byte-data-object" class="list-anchor">#</a>
- `Data|DataByte|DataObject` [string]? | [byte]&#91;&#93;? | [object]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-data"/><a href="#api-request-context-put-option-data" class="list-anchor">#</a>

Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be set to `application/octet-stream` if not explicitly set.
- `FailOnStatusCode` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-fail-on-status-code"/><a href="#api-request-context-put-option-fail-on-status-code" class="list-anchor">#</a>
Expand Down Expand Up @@ -557,7 +557,7 @@ await ApiRequestContext.StorageStateAsync(options);
- `options` `ApiRequestContextStorageStateOptions?` *(optional)*
- `Path` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-storage-state-option-path"/><a href="#api-request-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If `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.
The file path to save the storage state to. If [Path](/api/class-apirequestcontext.mdx#api-request-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.

**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>
Expand Down Expand Up @@ -602,6 +602,7 @@ await ApiRequestContext.StorageStateAsync(options);
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ ApiResponse.Url
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Expect(Response).Not
[WebError]: /api/class-weberror.mdx "WebError"
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketFrame]: /api/class-websocketframe.mdx "WebSocketFrame"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
Expand Down
Loading

0 comments on commit ba51b71

Please sign in to comment.