Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (23-07-24) (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Jul 23, 2024
1 parent 5ec8a35 commit 40e8dcd
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 103 deletions.
12 changes: 6 additions & 6 deletions dotnet/docs/api/class-apirequestcontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ await Request.FetchAsync("https://example.com/api/uploadScript", new() { Method
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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 @@ -242,7 +242,7 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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 @@ -299,7 +299,7 @@ await ApiRequestContext.HeadAsync(url, options);
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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 @@ -356,7 +356,7 @@ await ApiRequestContext.PatchAsync(url, options);
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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 @@ -442,7 +442,7 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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 @@ -499,7 +499,7 @@ await ApiRequestContext.PutAsync(url, options);
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 socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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
2 changes: 1 addition & 1 deletion dotnet/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy
image: mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
Expand Down
8 changes: 4 additions & 4 deletions dotnet/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ trigger:
pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy
container: mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy
steps:
- task: UseDotNet@2
Expand All @@ -102,7 +102,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-jammy-development:
docker:
- image: mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy
- image: mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy
```

Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
Expand All @@ -113,7 +113,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy' } }
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -130,7 +130,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).
```yml
image: mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy
image: mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy
```
### GitLab CI
Expand Down
14 changes: 7 additions & 7 deletions dotnet/docs/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image

```bash
docker pull mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy
docker pull mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy
```

### Run the image
Expand All @@ -33,15 +33,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.

```bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy /bin/bash
```

#### Crawling and scraping

On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.

```bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.45.0-jammy /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.45.1-jammy /bin/bash
```

[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
Expand Down Expand Up @@ -76,10 +76,10 @@ See [all available image tags].
We currently publish images with the following tags:
- `:next` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:next-jammy` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0` - Playwright v1.45.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0-noble` - Playwright v1.45.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.45.0-jammy` - Playwright v1.45.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0-focal` - Playwright v1.45.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).
- `:v1.45.1` - Playwright v1.45.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.1-noble` - Playwright v1.45.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.45.1-jammy` - Playwright v1.45.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.1-focal` - Playwright v1.45.1 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).

:::note
It is recommended to always pin your Docker image to a specific version if possible. If the Playwright version in your Docker image does not match the version in your project/tests, Playwright will be unable to locate browser executables.
Expand Down
2 changes: 1 addition & 1 deletion java/docs/api/class-requestoptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ RequestOptions.setMaxRetries(maxRetries);
**Arguments**
- `maxRetries` [int]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-options-set-max-retries-option-max-retries"/><a href="#request-options-set-max-retries-option-max-retries" class="list-anchor">#</a>

Maximum number of times socket errors should be retried. Currently only `ECONNRESET` error is retried. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
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.

**Returns**
- [RequestOptions]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-options-set-max-retries-return"/><a href="#request-options-set-max-retries-return" class="list-anchor">#</a>
Expand Down
2 changes: 1 addition & 1 deletion java/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/java:v1.45.0-jammy
image: mcr.microsoft.com/playwright/java:v1.45.1-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
Expand Down
10 changes: 5 additions & 5 deletions java/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ trigger:
pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/java:v1.45.0-jammy
container: mcr.microsoft.com/playwright/java:v1.45.1-jammy
steps:
- task: JavaToolInstaller@0
Expand All @@ -101,7 +101,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-jammy-development:
docker:
- image: mcr.microsoft.com/playwright/java:v1.45.0-jammy
- image: mcr.microsoft.com/playwright/java:v1.45.1-jammy
```

Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
Expand All @@ -112,7 +112,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.45.0-jammy' } }
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.45.1-jammy' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -129,7 +129,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).
```yml
image: mcr.microsoft.com/playwright/java:v1.45.0-jammy
image: mcr.microsoft.com/playwright/java:v1.45.1-jammy
```
### GitLab CI
Expand All @@ -142,7 +142,7 @@ stages:
tests:
stage: test
image: mcr.microsoft.com/playwright/java:v1.45.0-jammy
image: mcr.microsoft.com/playwright/java:v1.45.1-jammy
script:
...
```
Expand Down
14 changes: 7 additions & 7 deletions java/docs/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image

```bash
docker pull mcr.microsoft.com/playwright/java:v1.45.0-jammy
docker pull mcr.microsoft.com/playwright/java:v1.45.1-jammy
```

### Run the image
Expand All @@ -33,15 +33,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.

```bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.45.0-jammy /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.45.1-jammy /bin/bash
```

#### Crawling and scraping

On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.

```bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.45.0-jammy /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.45.1-jammy /bin/bash
```

[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
Expand Down Expand Up @@ -76,10 +76,10 @@ See [all available image tags].
We currently publish images with the following tags:
- `:next` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:next-jammy` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0` - Playwright v1.45.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0-noble` - Playwright v1.45.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.45.0-jammy` - Playwright v1.45.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.0-focal` - Playwright v1.45.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).
- `:v1.45.1` - Playwright v1.45.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.1-noble` - Playwright v1.45.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.45.1-jammy` - Playwright v1.45.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.45.1-focal` - Playwright v1.45.1 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).

:::note
It is recommended to always pin your Docker image to a specific version if possible. If the Playwright version in your Docker image does not match the version in your project/tests, Playwright will be unable to locate browser executables.
Expand Down
Loading

0 comments on commit 40e8dcd

Please sign in to comment.