From cc2565ac3bd7afc53cb641a179be94ddb90d3db2 Mon Sep 17 00:00:00 2001
From: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 5 Feb 2025 10:11:20 +0000
Subject: [PATCH] feat(roll): roll to ToT Playwright (05-02-25)
---
dotnet/docs/api/class-browser.mdx | 6 ++++++
dotnet/docs/api/class-browsertype.mdx | 3 +++
dotnet/docs/api/class-page.mdx | 1 +
java/docs/api/class-browser.mdx | 6 ++++++
java/docs/api/class-browsertype.mdx | 3 +++
java/docs/api/class-page.mdx | 3 +++
java/docs/ci.mdx | 12 ++++++------
java/docs/docker.mdx | 16 ++++++++--------
java/docs/intro.mdx | 2 +-
java/docs/test-runners.mdx | 4 ++--
nodejs/docs/api/class-androiddevice.mdx | 3 +++
nodejs/docs/api/class-browser.mdx | 6 ++++++
nodejs/docs/api/class-browsertype.mdx | 3 +++
nodejs/docs/api/class-page.mdx | 3 +++
nodejs/docs/ci.mdx | 2 +-
python/docs/api/class-apirequestcontext.mdx | 14 +++++++-------
python/docs/api/class-apiresponse.mdx | 2 +-
python/docs/api/class-browser.mdx | 6 ++++++
python/docs/api/class-browsertype.mdx | 3 +++
python/docs/api/class-elementhandle.mdx | 4 ++--
python/docs/api/class-frame.mdx | 6 +++---
python/docs/api/class-jshandle.mdx | 4 ++--
python/docs/api/class-locator.mdx | 4 ++--
python/docs/api/class-page.mdx | 7 ++++---
python/docs/api/class-request.mdx | 2 +-
python/docs/api/class-response.mdx | 2 +-
python/docs/api/class-route.mdx | 8 ++++----
python/docs/api/class-worker.mdx | 2 +-
28 files changed, 92 insertions(+), 45 deletions(-)
diff --git a/dotnet/docs/api/class-browser.mdx b/dotnet/docs/api/class-browser.mdx
index 65dc80ef155..7a53c7bbf4e 100644
--- a/dotnet/docs/api/class-browser.mdx
+++ b/dotnet/docs/api/class-browser.mdx
@@ -215,6 +215,9 @@ await browser.CloseAsync();
- `ColorScheme` `enum ColorScheme { Light, Dark, NoPreference, Null }?` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+ - `Contrast` `enum ForcedColors { NoPreference, More, Null }?` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `DeviceScaleFactor` [float]? *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
@@ -430,6 +433,9 @@ await Browser.NewPageAsync(options);
- `ColorScheme` `enum ColorScheme { Light, Dark, NoPreference, Null }?` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+ - `Contrast` `enum ForcedColors { NoPreference, More, Null }?` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `DeviceScaleFactor` [float]? *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/dotnet/docs/api/class-browsertype.mdx b/dotnet/docs/api/class-browsertype.mdx
index 4eb34bca280..7cb378d26fa 100644
--- a/dotnet/docs/api/class-browsertype.mdx
+++ b/dotnet/docs/api/class-browsertype.mdx
@@ -344,6 +344,9 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `ColorScheme` `enum ColorScheme { Light, Dark, NoPreference, Null }?` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+ - `Contrast` `enum ForcedColors { NoPreference, More, Null }?` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `DeviceScaleFactor` [float]? *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/dotnet/docs/api/class-page.mdx b/dotnet/docs/api/class-page.mdx
index 46ec8d92e52..b914a7e8dc6 100644
--- a/dotnet/docs/api/class-page.mdx
+++ b/dotnet/docs/api/class-page.mdx
@@ -436,6 +436,7 @@ await page.EvaluateAsync("matchMedia('(prefers-color-scheme: light)').matches");
- `ColorScheme` `enum ColorScheme { Light, Dark, NoPreference, Null }?` *(optional)* Added in: v1.9#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. Passing `'Null'` disables color scheme emulation. `'no-preference'` is deprecated.
+ - `Contrast` `enum Contrast { NoPreference, More, Null }?` *(optional)* Added in: v1.51#
- `ForcedColors` `enum ForcedColors { Active, None, Null }?` *(optional)* Added in: v1.15#
- `Media` `enum Media { Screen, Print, Null }?` *(optional)* Added in: v1.9#
diff --git a/java/docs/api/class-browser.mdx b/java/docs/api/class-browser.mdx
index f4d41ca4131..4d1835a5afc 100644
--- a/java/docs/api/class-browser.mdx
+++ b/java/docs/api/class-browser.mdx
@@ -219,6 +219,9 @@ browser.close();
- `setColorScheme` [null] | `enum ColorScheme { LIGHT, DARK, NO_PREFERENCE }` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `setContrast` [null] | `enum ForcedColors { NO_PREFERENCE, MORE }` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `setDeviceScaleFactor` [double] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
@@ -435,6 +438,9 @@ Browser.newPage(options);
- `setColorScheme` [null] | `enum ColorScheme { LIGHT, DARK, NO_PREFERENCE }` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `setContrast` [null] | `enum ForcedColors { NO_PREFERENCE, MORE }` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `setDeviceScaleFactor` [double] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/java/docs/api/class-browsertype.mdx b/java/docs/api/class-browsertype.mdx
index 1ce9c7099bd..49b7158ef80 100644
--- a/java/docs/api/class-browsertype.mdx
+++ b/java/docs/api/class-browsertype.mdx
@@ -344,6 +344,9 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setColorScheme` [null] | `enum ColorScheme { LIGHT, DARK, NO_PREFERENCE }` *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `setContrast` [null] | `enum ForcedColors { NO_PREFERENCE, MORE }` *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `setDeviceScaleFactor` [double] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/java/docs/api/class-page.mdx b/java/docs/api/class-page.mdx
index 99702cf468d..2913317fb5b 100644
--- a/java/docs/api/class-page.mdx
+++ b/java/docs/api/class-page.mdx
@@ -437,6 +437,9 @@ page.evaluate("() => matchMedia('(prefers-color-scheme: light)').matches");
- `setColorScheme` [null] | `enum ColorScheme { LIGHT, DARK, NO_PREFERENCE }` *(optional)* Added in: v1.9#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. Passing `null` disables color scheme emulation. `'no-preference'` is deprecated.
+ - `setContrast` [null] | `enum Contrast { NO_PREFERENCE, MORE }` *(optional)* Added in: v1.51#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. Passing `null` disables contrast emulation.
- `setForcedColors` [null] | `enum ForcedColors { ACTIVE, NONE }` *(optional)* Added in: v1.15#
Emulates `'forced-colors'` media feature, supported values are `'active'` and `'none'`. Passing `null` disables forced colors emulation.
diff --git a/java/docs/ci.mdx b/java/docs/ci.mdx
index 2cb3ab0b270..92567dbdde9 100644
--- a/java/docs/ci.mdx
+++ b/java/docs/ci.mdx
@@ -75,7 +75,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
- image: mcr.microsoft.com/playwright/java:v1.49.0-noble
+ image: mcr.microsoft.com/playwright/java:v1.50.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v4
@@ -165,7 +165,7 @@ trigger:
pool:
vmImage: ubuntu-latest
-container: mcr.microsoft.com/playwright/java:v1.49.0-noble
+container: mcr.microsoft.com/playwright/java:v1.50.0-noble
steps:
- task: JavaToolInstaller@0
@@ -188,7 +188,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.49.0-noble
+ - image: mcr.microsoft.com/playwright/java:v1.50.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.
@@ -199,7 +199,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](
```groovy
pipeline {
- agent { docker { image 'mcr.microsoft.com/playwright/java:v1.49.0-noble' } }
+ agent { docker { image 'mcr.microsoft.com/playwright/java:v1.50.0-noble' } }
stages {
stage('e2e-tests') {
steps {
@@ -216,7 +216,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.49.0-noble
+image: mcr.microsoft.com/playwright/java:v1.50.0-noble
```
### GitLab CI
@@ -229,7 +229,7 @@ stages:
tests:
stage: test
- image: mcr.microsoft.com/playwright/java:v1.49.0-noble
+ image: mcr.microsoft.com/playwright/java:v1.50.0-noble
script:
...
```
diff --git a/java/docs/docker.mdx b/java/docs/docker.mdx
index e64e5014009..e07b8322747 100644
--- a/java/docs/docker.mdx
+++ b/java/docs/docker.mdx
@@ -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.49.0-noble
+docker pull mcr.microsoft.com/playwright/java:v1.50.0-noble
```
### Run the image
@@ -34,7 +34,7 @@ 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.49.0-noble /bin/bash
+docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.50.0-noble /bin/bash
```
#### Crawling and scraping
@@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.49.0-noble /
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.49.0-noble /bin/bash
+docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.50.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:
@@ -79,7 +79,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.49.0-noble /bin/sh -c "npx -y playwright@1.49.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.50.0-noble /bin/sh -c "npx -y playwright@1.50.0 run-server --port 3000 --host 0.0.0.0"
```
#### Connecting to the Server
@@ -104,7 +104,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.49.0-noble /bin/sh -c "npx -y playwright@1.49.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.50.0-noble /bin/sh -c "npx -y playwright@1.50.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.
@@ -119,9 +119,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.49.0` - Playwright v1.49.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.49.0-noble` - Playwright v1.49.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.49.0-jammy` - Playwright v1.49.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
+- `:v1.50.0` - Playwright v1.50.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.50.0-noble` - Playwright v1.50.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.50.0-jammy` - Playwright v1.50.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
:::note
diff --git a/java/docs/intro.mdx b/java/docs/intro.mdx
index 4022a40fa02..b0fd34a351b 100644
--- a/java/docs/intro.mdx
+++ b/java/docs/intro.mdx
@@ -58,7 +58,7 @@ public class App {
com.microsoft.playwright
playwright
- 1.49.0
+ 1.50.0
diff --git a/java/docs/test-runners.mdx b/java/docs/test-runners.mdx
index 8042eb3e4e2..8e7cb20de6a 100644
--- a/java/docs/test-runners.mdx
+++ b/java/docs/test-runners.mdx
@@ -198,7 +198,7 @@ repositories {
}
dependencies {
- implementation 'com.microsoft.playwright:playwright:1.49.0'
+ implementation 'com.microsoft.playwright:playwright:1.50.0'
}
application {
@@ -231,7 +231,7 @@ repositories {
}
dependencies {
- implementation("com.microsoft.playwright:playwright:1.49.0")
+ implementation("com.microsoft.playwright:playwright:1.50.0")
}
application {
diff --git a/nodejs/docs/api/class-androiddevice.mdx b/nodejs/docs/api/class-androiddevice.mdx
index 61f61f5990f..b5907d300d4 100644
--- a/nodejs/docs/api/class-androiddevice.mdx
+++ b/nodejs/docs/api/class-androiddevice.mdx
@@ -219,6 +219,9 @@ await androidDevice.launchBrowser(options);
- `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `contrast` [null] | "no-preference" | "more" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `deviceScaleFactor` [number] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/nodejs/docs/api/class-browser.mdx b/nodejs/docs/api/class-browser.mdx
index 5cb39ae10ad..c5f5f031ce2 100644
--- a/nodejs/docs/api/class-browser.mdx
+++ b/nodejs/docs/api/class-browser.mdx
@@ -217,6 +217,9 @@ If directly using this method to create [BrowserContext]s, it is best practice t
- `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `contrast` [null] | "no-preference" | "more" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `deviceScaleFactor` [number] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
@@ -501,6 +504,9 @@ await browser.newPage(options);
- `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `contrast` [null] | "no-preference" | "more" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `deviceScaleFactor` [number] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/nodejs/docs/api/class-browsertype.mdx b/nodejs/docs/api/class-browsertype.mdx
index 3ddba8f3b0b..fbdf67d9568 100644
--- a/nodejs/docs/api/class-browsertype.mdx
+++ b/nodejs/docs/api/class-browsertype.mdx
@@ -348,6 +348,9 @@ await browserType.launchPersistentContext(userDataDir, options);
- `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
+ - `contrast` [null] | "no-preference" | "more" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
- `deviceScaleFactor` [number] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx
index f346f4e23d3..d282cd8e2d5 100644
--- a/nodejs/docs/api/class-page.mdx
+++ b/nodejs/docs/api/class-page.mdx
@@ -449,6 +449,9 @@ await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
- `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)* Added in: v1.9#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. Passing `null` disables color scheme emulation. `'no-preference'` is deprecated.
+ - `contrast` [null] | "no-preference" | "more" *(optional)* Added in: v1.51#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. Passing `null` disables contrast emulation.
- `forcedColors` [null] | "active" | "none" *(optional)* Added in: v1.15#
Emulates `'forced-colors'` media feature, supported values are `'active'` and `'none'`. Passing `null` disables forced colors emulation.
diff --git a/nodejs/docs/ci.mdx b/nodejs/docs/ci.mdx
index 705e56f5600..144e78ba4fd 100644
--- a/nodejs/docs/ci.mdx
+++ b/nodejs/docs/ci.mdx
@@ -378,7 +378,7 @@ Sharding in CircleCI is indexed with 0 which means that you will need to overrid
executor: pw-noble-development
parallelism: 4
steps:
- - run: SHARD="$((${CIRCLE_NODE_INDEX}+1))"; npx playwright test -- --shard=${SHARD}/${CIRCLE_NODE_TOTAL}
+ - run: SHARD="$((${CIRCLE_NODE_INDEX}+1))"; npx playwright test --shard=${SHARD}/${CIRCLE_NODE_TOTAL}
```
### Jenkins
diff --git a/python/docs/api/class-apirequestcontext.mdx b/python/docs/api/class-apirequestcontext.mdx
index 6c594e81a0d..984c69653be 100644
--- a/python/docs/api/class-apirequestcontext.mdx
+++ b/python/docs/api/class-apirequestcontext.mdx
@@ -155,7 +155,7 @@ api_request_context.delete(url, **kwargs)
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)* Added in: v1.17#
+- `data` [str] | [bytes] | [Dict] *(optional)* Added in: v1.17#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -259,7 +259,7 @@ api_request_context.fetch(
- `url_or_request` [str] | [Request]#
Target URL or Request to get all parameters from.
-- `data` [str] | [bytes] | [Serializable] *(optional)*#
+- `data` [str] | [bytes] | [Dict] *(optional)*#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -329,7 +329,7 @@ api_request_context.get("https://example.com/api/getText", params=query_params)
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)* Added in: v1.26#
+- `data` [str] | [bytes] | [Dict] *(optional)* Added in: v1.26#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -391,7 +391,7 @@ api_request_context.head(url, **kwargs)
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)* Added in: v1.26#
+- `data` [str] | [bytes] | [Dict] *(optional)* Added in: v1.26#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -453,7 +453,7 @@ api_request_context.patch(url, **kwargs)
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)*#
+- `data` [str] | [bytes] | [Dict] *(optional)*#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -544,7 +544,7 @@ api_request_context.post(
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)*#
+- `data` [str] | [bytes] | [Dict] *(optional)*#
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.
- `fail_on_status_code` [bool] *(optional)*#
@@ -606,7 +606,7 @@ api_request_context.put(url, **kwargs)
- `url` [str]#
Target URL.
-- `data` [str] | [bytes] | [Serializable] *(optional)*#
+- `data` [str] | [bytes] | [Dict] *(optional)*#
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.
- `fail_on_status_code` [bool] *(optional)*#
diff --git a/python/docs/api/class-apiresponse.mdx b/python/docs/api/class-apiresponse.mdx
index 1646890a88b..e49b1879266 100644
--- a/python/docs/api/class-apiresponse.mdx
+++ b/python/docs/api/class-apiresponse.mdx
@@ -113,7 +113,7 @@ api_response.json()
```
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-browser.mdx b/python/docs/api/class-browser.mdx
index a97f9ee7122..2640518ed9b 100644
--- a/python/docs/api/class-browser.mdx
+++ b/python/docs/api/class-browser.mdx
@@ -223,6 +223,9 @@ await browser.close()
- `color_scheme` "light" | "dark" | "no-preference" | "null" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+- `contrast` "no-preference" | "more" | "null" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `device_scale_factor` [float] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
@@ -475,6 +478,9 @@ browser.new_page(**kwargs)
- `color_scheme` "light" | "dark" | "no-preference" | "null" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+- `contrast` "no-preference" | "more" | "null" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `device_scale_factor` [float] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/python/docs/api/class-browsertype.mdx b/python/docs/api/class-browsertype.mdx
index c7c302e9ca6..c58687d0aa0 100644
--- a/python/docs/api/class-browsertype.mdx
+++ b/python/docs/api/class-browsertype.mdx
@@ -396,6 +396,9 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs)
- `color_scheme` "light" | "dark" | "no-preference" | "null" *(optional)*#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
+- `contrast` "no-preference" | "more" | "null" *(optional)*#
+
+ Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [page.emulate_media()](/api/class-page.mdx#page-emulate-media) for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.
- `device_scale_factor` [float] *(optional)*#
Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about [emulating devices with device scale factor](../emulation.mdx#devices).
diff --git a/python/docs/api/class-elementhandle.mdx b/python/docs/api/class-elementhandle.mdx
index 7448209d80f..1ee6364d7c0 100644
--- a/python/docs/api/class-elementhandle.mdx
+++ b/python/docs/api/class-elementhandle.mdx
@@ -602,7 +602,7 @@ assert await tweet_handle.eval_on_selector(".retweets", "node => node.innerText"
Optional argument to pass to [expression](/api/class-elementhandle.mdx#element-handle-eval-on-selector-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -670,7 +670,7 @@ assert await feed_handle.eval_on_selector_all(".tweet", "nodes => nodes.map(n =>
Optional argument to pass to [expression](/api/class-elementhandle.mdx#element-handle-eval-on-selector-all-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-frame.mdx b/python/docs/api/class-frame.mdx
index ab500b5a0b7..efffa94f093 100644
--- a/python/docs/api/class-frame.mdx
+++ b/python/docs/api/class-frame.mdx
@@ -329,7 +329,7 @@ await body_handle.dispose()
Optional argument to pass to [expression](/api/class-frame.mdx#frame-evaluate-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -1897,7 +1897,7 @@ html = await frame.eval_on_selector(".main-container", "(e, suffix) => e.outerHT
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -1956,7 +1956,7 @@ divs_counts = await frame.eval_on_selector_all("div", "(divs, min) => divs.lengt
Optional argument to pass to [expression](/api/class-frame.mdx#frame-eval-on-selector-all-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-jshandle.mdx b/python/docs/api/class-jshandle.mdx
index dc16f89bc2c..fb7c05dd4b0 100644
--- a/python/docs/api/class-jshandle.mdx
+++ b/python/docs/api/class-jshandle.mdx
@@ -108,7 +108,7 @@ assert await tweet_handle.evaluate("node => node.innerText") == "10 retweets"
Optional argument to pass to [expression](/api/class-jshandle.mdx#js-handle-evaluate-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -231,7 +231,7 @@ js_handle.json_value()
```
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-locator.mdx b/python/docs/api/class-locator.mdx
index 04d1a1ef7af..caddfc8b253 100644
--- a/python/docs/api/class-locator.mdx
+++ b/python/docs/api/class-locator.mdx
@@ -926,7 +926,7 @@ Execute JavaScript code in the page, taking the matching element as an argument.
Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods.
**Returns**
-- [Serializable]#
+- [Dict]#
**Details**
@@ -981,7 +981,7 @@ more_than_ten = await locator.evaluate_all("(divs, min) => divs.length > min", 1
Optional argument to pass to [expression](/api/class-locator.mdx#locator-evaluate-all-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
**Details**
diff --git a/python/docs/api/class-page.mdx b/python/docs/api/class-page.mdx
index 414cbddf1ff..b8dc8b0b6bb 100644
--- a/python/docs/api/class-page.mdx
+++ b/python/docs/api/class-page.mdx
@@ -664,6 +664,7 @@ await page.evaluate("matchMedia('(prefers-color-scheme: light)').matches")
- `color_scheme` "light" | "dark" | "no-preference" | "null" *(optional)* Added in: v1.9#
Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. Passing `'Null'` disables color scheme emulation. `'no-preference'` is deprecated.
+- `contrast` "no-preference" | "more" | "null" *(optional)* Added in: v1.51#
- `forced_colors` "active" | "none" | "null" *(optional)* Added in: v1.15#
- `media` "screen" | "print" | "null" *(optional)* Added in: v1.9#
@@ -786,7 +787,7 @@ await body_handle.dispose()
Optional argument to pass to [expression](/api/class-page.mdx#page-evaluate-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -4437,7 +4438,7 @@ html = await page.eval_on_selector(".main-container", "(e, suffix) => e.outer_ht
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
**Returns**
-- [Serializable]#
+- [Dict]#
---
@@ -4494,7 +4495,7 @@ div_counts = await page.eval_on_selector_all("div", "(divs, min) => divs.length
Optional argument to pass to [expression](/api/class-page.mdx#page-eval-on-selector-all-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-request.mdx b/python/docs/api/class-request.mdx
index fc0ced70f46..98610ce4a86 100644
--- a/python/docs/api/class-request.mdx
+++ b/python/docs/api/class-request.mdx
@@ -282,7 +282,7 @@ request.post_data_json
```
**Returns**
-- [NoneType] | [Serializable]#
+- [NoneType] | [Dict]#
---
diff --git a/python/docs/api/class-response.mdx b/python/docs/api/class-response.mdx
index 48d7ae62291..415c87769a6 100644
--- a/python/docs/api/class-response.mdx
+++ b/python/docs/api/class-response.mdx
@@ -147,7 +147,7 @@ response.json()
```
**Returns**
-- [Serializable]#
+- [Dict]#
---
diff --git a/python/docs/api/class-route.mdx b/python/docs/api/class-route.mdx
index 1a6138a3178..a6bfc24b38e 100644
--- a/python/docs/api/class-route.mdx
+++ b/python/docs/api/class-route.mdx
@@ -110,7 +110,7 @@ await page.route("**/*", handle)
- `method` [str] *(optional)*#
If set changes the request method (e.g. GET or POST).
-- `post_data` [str] | [bytes] | [Serializable] *(optional)*#
+- `post_data` [str] | [bytes] | [Dict] *(optional)*#
If set changes the post data of request.
- `url` [str] *(optional)*#
@@ -279,7 +279,7 @@ Use [route.continue_()](/api/class-route.mdx#route-continue) to immediately send
- `method` [str] *(optional)*#
If set changes the request method (e.g. GET or POST).
-- `post_data` [str] | [bytes] | [Serializable] *(optional)*#
+- `post_data` [str] | [bytes] | [Dict] *(optional)*#
If set changes the post data of request.
- `url` [str] *(optional)*#
@@ -348,7 +348,7 @@ await page.route("https://dog.ceo/api/breeds/list/all", handle)
- `method` [str] *(optional)*#
If set changes the request method (e.g. GET or POST).
-- `post_data` [str] | [bytes] | [Serializable] *(optional)*#
+- `post_data` [str] | [bytes] | [Dict] *(optional)*#
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.
- `timeout` [float] *(optional)* Added in: v1.33#
@@ -443,7 +443,7 @@ await page.route("**/xhr_endpoint", lambda route: route.fulfill(path="mock_data.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Response headers. Header values will be converted to a string.
-- `json` [Serializable] *(optional)* Added in: v1.29#
+- `json` [Dict] *(optional)* Added in: v1.29#
JSON response. This method will set the content type to `application/json` if not set.
- `path` [Union]\[[str], [pathlib.Path]\] *(optional)*#
diff --git a/python/docs/api/class-worker.mdx b/python/docs/api/class-worker.mdx
index 46aa5313ffd..e628e7adecb 100644
--- a/python/docs/api/class-worker.mdx
+++ b/python/docs/api/class-worker.mdx
@@ -52,7 +52,7 @@ worker.evaluate(expression, **kwargs)
Optional argument to pass to [expression](/api/class-worker.mdx#worker-evaluate-option-expression).
**Returns**
-- [Serializable]#
+- [Dict]#
---