Skip to content

Commit

Permalink
feat(roll): roll to 1.46 Playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 5, 2024
1 parent 82d1b97 commit 22b01b7
Show file tree
Hide file tree
Showing 190 changed files with 4,814 additions and 3,423 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Most of the accessibility tree gets filtered out when converting from internal b

### SnapshotAsync {#accessibility-snapshot}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>accessibility.SnapshotAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>accessibility.SnapshotAsync</x-search>

:::warning Deprecated

Expand Down
47 changes: 39 additions & 8 deletions dotnet/versioned_docs/version-stable/api/class-apirequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,51 @@ 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>
- `Origin` [string] <font size="2">Added in: 1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-origin"/><a href="#api-request-new-context-option-origin" class="list-anchor">#</a>

Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
- `CertPath` [string]? *(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-cert-path"/><a href="#api-request-new-context-option-cert-path" class="list-anchor">#</a>

Path to the file with the certificate in PEM format.
- `KeyPath` [string]? *(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-key-path"/><a href="#api-request-new-context-option-key-path" class="list-anchor">#</a>

Path to the file with the private key in PEM format.
- `PfxPath` [string]? *(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-pfx-path"/><a href="#api-request-new-context-option-pfx-path" class="list-anchor">#</a>

Path to the PFX or PKCS12 encoded private key and certificate chain.
- `Passphrase` [string]? *(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-passphrase"/><a href="#api-request-new-context-option-passphrase" class="list-anchor">#</a>

Passphrase for the private key (PEM or PFX).

TLS Client Authentication allows the server to request a client certificate and verify it.

**Details**

An array of client certificates to be used. Each certificate object must have both `certPath` and `keyPath` or a single `pfxPath` to load the client certificate. Optionally, `passphrase` property should be provided if the certficiate 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`.
:::

- `ExtraHTTPHeaders` [IDictionary]?&lt;[string], [string]&gt; *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-extra-http-headers"/><a href="#api-request-new-context-option-extra-http-headers" class="list-anchor">#</a>

An object containing additional HTTP headers to be sent with every request. Defaults to none.
- `HttpCredentials` HttpCredentials? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-http-credentials"/><a href="#api-request-new-context-option-http-credentials" class="list-anchor">#</a>
- `Username` [string]
- `Username` [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-username"/><a href="#api-request-new-context-option-username" class="list-anchor">#</a>


- `Password` [string]
- `Password` [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-password"/><a href="#api-request-new-context-option-password" class="list-anchor">#</a>


- `Origin` [string]? *(optional)*
- `Origin` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-origin"/><a href="#api-request-new-context-option-origin" class="list-anchor">#</a>

Restrain sending http credentials on specific origin (scheme://host:port).
- `Send` `enum HttpCredentialsSend { Unauthorized, Always }?` *(optional)*
- `Send` `enum HttpCredentialsSend { Unauthorized, Always }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-send"/><a href="#api-request-new-context-option-send" class="list-anchor">#</a>

This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.

Expand All @@ -56,16 +87,16 @@ await ApiRequest.NewContextAsync(options);

Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `Proxy` Proxy? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-proxy"/><a href="#api-request-new-context-option-proxy" class="list-anchor">#</a>
- `Server` [string]
- `Server` [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-server"/><a href="#api-request-new-context-option-server" class="list-anchor">#</a>

Proxy to be used for all requests. 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)*
- `Bypass` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-bypass"/><a href="#api-request-new-context-option-bypass" class="list-anchor">#</a>

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `Username` [string]? *(optional)*
- `Username` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-username"/><a href="#api-request-new-context-option-username" class="list-anchor">#</a>

Optional username to use if HTTP proxy requires authentication.
- `Password` [string]? *(optional)*
- `Password` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-new-context-option-password"/><a href="#api-request-new-context-option-password" class="list-anchor">#</a>

Optional password to use if HTTP proxy requires authentication.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ await ApiRequestContext.DeleteAsync(url, options);
- `MaxRedirects` [int]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-delete-option-max-redirects"/><a href="#api-request-context-delete-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-delete-option-max-retries"/><a href="#api-request-context-delete-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(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-multipart"/><a href="#api-request-context-delete-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down Expand Up @@ -173,6 +176,9 @@ await Request.FetchAsync("https://example.com/api/uploadScript", new() { Method
- `MaxRedirects` [int]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-max-redirects"/><a href="#api-request-context-fetch-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-max-retries"/><a href="#api-request-context-fetch-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Method` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-fetch-option-method"/><a href="#api-request-context-fetch-option-method" class="list-anchor">#</a>

If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)). If not specified, GET method is used.
Expand Down Expand Up @@ -237,6 +243,9 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
- `MaxRedirects` [int]? *(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-max-redirects"/><a href="#api-request-context-get-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-get-option-max-retries"/><a href="#api-request-context-get-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(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-multipart"/><a href="#api-request-context-get-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down Expand Up @@ -291,6 +300,9 @@ await ApiRequestContext.HeadAsync(url, options);
- `MaxRedirects` [int]? *(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-max-redirects"/><a href="#api-request-context-head-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-head-option-max-retries"/><a href="#api-request-context-head-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(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-multipart"/><a href="#api-request-context-head-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down Expand Up @@ -345,6 +357,9 @@ await ApiRequestContext.PatchAsync(url, options);
- `MaxRedirects` [int]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-max-redirects"/><a href="#api-request-context-patch-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-max-retries"/><a href="#api-request-context-patch-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-patch-option-multipart"/><a href="#api-request-context-patch-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down Expand Up @@ -428,6 +443,9 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
- `MaxRedirects` [int]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-max-redirects"/><a href="#api-request-context-post-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-max-retries"/><a href="#api-request-context-post-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-post-option-multipart"/><a href="#api-request-context-post-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down Expand Up @@ -482,6 +500,9 @@ await ApiRequestContext.PutAsync(url, options);
- `MaxRedirects` [int]? *(optional)* <font size="2">Added in: v1.26</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-max-redirects"/><a href="#api-request-context-put-option-max-redirects" class="list-anchor">#</a>

Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to `20`. Pass `0` to not follow redirects.
- `MaxRetries` [int]? *(optional)* <font size="2">Added in: v1.46</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-max-retries"/><a href="#api-request-context-put-option-max-retries" class="list-anchor">#</a>

Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
- `Multipart` [FormData]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="api-request-context-put-option-multipart"/><a href="#api-request-context-put-option-multipart" class="list-anchor">#</a>

Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
Expand Down
Loading

0 comments on commit 22b01b7

Please sign in to comment.