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: 2 additions & 0 deletions dotnet/docs/test-assertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [Expect(Locator).ToBeHiddenAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-be-hidden) | Element is not visible |
| [Expect(Locator).ToBeInViewportAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-be-in-viewport) | Element intersects viewport |
| [Expect(Locator).ToBeVisibleAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible) | Element is visible |
| [Expect(Locator).ToContainClassAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) | Element has specified CSS classes |
| [Expect(Locator).ToContainTextAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-text) | Element contains text |
| [Expect(Locator).ToHaveAccessibleDescriptionAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-description) | Element has a matching [accessible description](https://w3c.github.io/accname/#dfn-accessible-description) |
| [Expect(Locator).ToHaveAccessibleNameAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-name) | Element has a matching [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) |
Expand All @@ -33,6 +34,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [Expect(Locator).ToHaveTextAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-text) | Element matches text |
| [Expect(Locator).ToHaveValueAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-value) | Input has a value |
| [Expect(Locator).ToHaveValuesAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-values) | Select has options selected |
| [Expect(Locator).ToMatchAriaSnapshotAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot) | Element matches provided Aria snapshot |
| [Expect(Page).ToHaveTitleAsync()](/api/class-pageassertions.mdx#page-assertions-to-have-title) | Page has a title |
| [Expect(Page).ToHaveURLAsync()](/api/class-pageassertions.mdx#page-assertions-to-have-url) | Page has a URL |
| [Expect(Response).ToBeOKAsync()](/api/class-apiresponseassertions.mdx#api-response-assertions-to-be-ok) | Response has an OK status |
Expand Down
12 changes: 6 additions & 6 deletions java/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/java:v1.51.0-noble
image: mcr.microsoft.com/playwright/java:v1.52.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -160,7 +160,7 @@ trigger:

pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/java:v1.51.0-noble
container: mcr.microsoft.com/playwright/java:v1.52.0-noble

steps:
- task: JavaToolInstaller@0
Expand All @@ -183,7 +183,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- image: mcr.microsoft.com/playwright/java:v1.51.0-noble
- image: mcr.microsoft.com/playwright/java:v1.52.0-noble
```

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 @@ -194,7 +194,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.51.0-noble' } }
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.52.0-noble' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -211,7 +211,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.51.0-noble
image: mcr.microsoft.com/playwright/java:v1.52.0-noble
```

### GitLab CI
Expand All @@ -224,7 +224,7 @@ stages:

tests:
stage: test
image: mcr.microsoft.com/playwright/java:v1.51.0-noble
image: mcr.microsoft.com/playwright/java:v1.52.0-noble
script:
...
```
Expand Down
16 changes: 8 additions & 8 deletions java/docs/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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.51.0-noble
docker pull mcr.microsoft.com/playwright/java:v1.52.0-noble
```

### Run the image
Expand All @@ -34,15 +34,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.51.0-noble /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.52.0-noble /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.51.0-noble /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.52.0-noble /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 @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the
Start the Playwright Server in Docker:

```bash
docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.51.0-noble /bin/sh -c "npx -y playwright@1.51.0 run-server --port 3000 --host 0.0.0.0"
docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.52.0-noble /bin/sh -c "npx -y playwright@1.52.0 run-server --port 3000 --host 0.0.0.0"
```

#### Connecting to the Server
Expand All @@ -107,7 +107,7 @@ public class App {
If you need to access local servers from within the Docker container:

```bash
docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.51.0-noble /bin/sh -c "npx -y playwright@1.51.0 run-server --port 3000 --host 0.0.0.0"
docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.52.0-noble /bin/sh -c "npx -y playwright@1.52.0 run-server --port 3000 --host 0.0.0.0"
```

This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers.
Expand All @@ -122,9 +122,9 @@ When running tests remotely, ensure the Playwright version in your tests matches
See [all available image tags].

We currently publish images with the following tags:
- `:v1.51.0` - Playwright v1.51.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.51.0-noble` - Playwright v1.51.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.51.0-jammy` - Playwright v1.51.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.52.0` - Playwright v1.52.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.52.0-noble` - Playwright v1.52.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.52.0-jammy` - Playwright v1.52.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).

:::note

Expand Down
2 changes: 1 addition & 1 deletion java/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class App {
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.51.0</version>
<version>1.52.0</version>
</dependency>
</dependencies>
<build>
Expand Down
2 changes: 2 additions & 0 deletions java/docs/test-assertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [assertThat(locator).isHidden()](/api/class-locatorassertions.mdx#locator-assertions-to-be-hidden) | Element is not visible |
| [assertThat(locator).isInViewport()](/api/class-locatorassertions.mdx#locator-assertions-to-be-in-viewport) | Element intersects viewport |
| [assertThat(locator).isVisible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible) | Element is visible |
| [assertThat(locator).containsClass()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) | Element has specified CSS classes |
| [assertThat(locator).containsText()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-text) | Element contains text |
| [assertThat(locator).hasAccessibleDescription()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-description) | Element has a matching [accessible description](https://w3c.github.io/accname/#dfn-accessible-description) |
| [assertThat(locator).hasAccessibleName()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-name) | Element has a matching [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) |
Expand All @@ -33,6 +34,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [assertThat(locator).hasText()](/api/class-locatorassertions.mdx#locator-assertions-to-have-text) | Element matches text |
| [assertThat(locator).hasValue()](/api/class-locatorassertions.mdx#locator-assertions-to-have-value) | Input has a value |
| [assertThat(locator).hasValues()](/api/class-locatorassertions.mdx#locator-assertions-to-have-values) | Select has options selected |
| [assertThat(locator).matchesAriaSnapshot()](/api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot) | Element matches provided Aria snapshot |
| [assertThat(page).hasTitle()](/api/class-pageassertions.mdx#page-assertions-to-have-title) | Page has a title |
| [assertThat(page).hasURL()](/api/class-pageassertions.mdx#page-assertions-to-have-url) | Page has a URL |
| [assertThat(response).isOK()](/api/class-apiresponseassertions.mdx#api-response-assertions-to-be-ok) | Response has an OK status |
Expand Down
4 changes: 2 additions & 2 deletions java/docs/test-runners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ repositories {
}

dependencies {
implementation 'com.microsoft.playwright:playwright:1.51.0'
implementation 'com.microsoft.playwright:playwright:1.52.0'
}

application {
Expand Down Expand Up @@ -231,7 +231,7 @@ repositories {
}

dependencies {
implementation("com.microsoft.playwright:playwright:1.51.0")
implementation("com.microsoft.playwright:playwright:1.52.0")
}

application {
Expand Down
4 changes: 3 additions & 1 deletion nodejs/docs/test-assertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ The following assertions will retry until the assertion passes, or the assertion
| [await expect(locator).toBeInViewport()](./api/class-locatorassertions.mdx#locator-assertions-to-be-in-viewport) | Element intersects viewport |
| [await expect(locator).toBeVisible()](./api/class-locatorassertions.mdx#locator-assertions-to-be-visible) | Element is visible |
| [await expect(locator).toContainText()](./api/class-locatorassertions.mdx#locator-assertions-to-contain-text) | Element contains text |
| [await expect(locator).toContainClass()](./api/class-locatorassertions.mdx#locator-assertions-to-contain-class) | Element has specified CSS classes |
| [await expect(locator).toHaveAccessibleDescription()](./api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-description) | Element has a matching [accessible description](https://w3c.github.io/accname/#dfn-accessible-description) |
| [await expect(locator).toHaveAccessibleName()](./api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-name) | Element has a matching [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) |
| [await expect(locator).toHaveAttribute()](./api/class-locatorassertions.mdx#locator-assertions-to-have-attribute) | Element has a DOM attribute |
| [await expect(locator).toHaveClass()](./api/class-locatorassertions.mdx#locator-assertions-to-have-class) | Element has a class property |
| [await expect(locator).toHaveClass()](./api/class-locatorassertions.mdx#locator-assertions-to-have-class) | Element has specified CSS class property |
| [await expect(locator).toHaveCount()](./api/class-locatorassertions.mdx#locator-assertions-to-have-count) | List has exact number of children |
| [await expect(locator).toHaveCSS()](./api/class-locatorassertions.mdx#locator-assertions-to-have-css) | Element has CSS property |
| [await expect(locator).toHaveId()](./api/class-locatorassertions.mdx#locator-assertions-to-have-id) | Element has an ID |
Expand All @@ -54,6 +55,7 @@ The following assertions will retry until the assertion passes, or the assertion
| [await expect(locator).toHaveText()](./api/class-locatorassertions.mdx#locator-assertions-to-have-text) | Element matches text |
| [await expect(locator).toHaveValue()](./api/class-locatorassertions.mdx#locator-assertions-to-have-value) | Input has a value |
| [await expect(locator).toHaveValues()](./api/class-locatorassertions.mdx#locator-assertions-to-have-values) | Select has options selected |
| [await expect(locator).toMatchAriaSnapshot()](./api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot) | Element matches the Aria snapshot |
| [await expect(page).toHaveScreenshot()](./api/class-pageassertions.mdx#page-assertions-to-have-screenshot-1) | Page has a screenshot |
| [await expect(page).toHaveTitle()](./api/class-pageassertions.mdx#page-assertions-to-have-title) | Page has a title |
| [await expect(page).toHaveURL()](./api/class-pageassertions.mdx#page-assertions-to-have-url) | Page has a URL |
Expand Down
2 changes: 2 additions & 0 deletions python/docs/test-assertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [expect(locator).to_be_hidden()](/api/class-locatorassertions.mdx#locator-assertions-to-be-hidden) | Element is not visible |
| [expect(locator).to_be_in_viewport()](/api/class-locatorassertions.mdx#locator-assertions-to-be-in-viewport) | Element intersects viewport |
| [expect(locator).to_be_visible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible) | Element is visible |
| [expect(locator).to_contain_class()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) | Element has specified CSS classes |
| [expect(locator).to_contain_text()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-text) | Element contains text |
| [expect(locator).to_have_accessible_description()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-description) | Element has a matching [accessible description](https://w3c.github.io/accname/#dfn-accessible-description) |
| [expect(locator).to_have_accessible_name()](/api/class-locatorassertions.mdx#locator-assertions-to-have-accessible-name) | Element has a matching [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) |
Expand All @@ -33,6 +34,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [expect(locator).to_have_text()](/api/class-locatorassertions.mdx#locator-assertions-to-have-text) | Element matches text |
| [expect(locator).to_have_value()](/api/class-locatorassertions.mdx#locator-assertions-to-have-value) | Input has a value |
| [expect(locator).to_have_values()](/api/class-locatorassertions.mdx#locator-assertions-to-have-values) | Select has options selected |
| [expect(locator).to_match_aria_snapshot()](/api/class-locatorassertions.mdx#locator-assertions-to-match-aria-snapshot) | Element matches provided Aria snapshot |
| [expect(page).to_have_title()](/api/class-pageassertions.mdx#page-assertions-to-have-title) | Page has a title |
| [expect(page).to_have_url()](/api/class-pageassertions.mdx#page-assertions-to-have-url) | Page has a URL |
| [expect(response).to_be_ok()](/api/class-apiresponseassertions.mdx#api-response-assertions-to-be-ok) | Response has an OK status |
Expand Down
Loading