Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
797946e
fix: support async predicates in page.expect_request/expect_response …
Skn0tt Apr 30, 2026
67e59f5
fix(asyncio): do not deadlock in atexit handler (#3056)
dgozman Apr 30, 2026
f3d8fd1
fix: handle ignore_default_args=False in launch params (#3058)
Skn0tt Apr 30, 2026
86415b6
fix(typing): typed overloads for expect_event and wait_for_event (#3061)
dgozman Apr 30, 2026
9035a63
build(deps): bump the actions group across 1 directory with 4 updates…
dependabot[bot] May 4, 2026
58e36b3
build(deps): bump pyopenssl from 25.1.0 to 26.0.0 in the pip group ac…
dependabot[bot] May 4, 2026
2a384b1
build(deps): bump setuptools-scm from 8.3.1 to 9.2.2 (#2994)
dependabot[bot] May 4, 2026
deb2df8
build(deps): bump pytest-cov from 6.3.0 to 7.1.0 (#2976)
dependabot[bot] May 4, 2026
ac9bf29
build(deps): bump types-requests from 2.32.4.20250809 to 2.32.4.20260…
dependabot[bot] May 4, 2026
161bd3d
build(deps): bump flake8 from 7.2.0 to 7.3.0 (#2896)
dependabot[bot] May 4, 2026
856ae37
devops: Update EsrpRelease (#3064)
Skn0tt May 5, 2026
9df9fac
feat: accept datetime.timedelta for timeout parameters (#3059)
Skn0tt May 5, 2026
873c5c7
fix(setup): update auditwheel to 6.4.0 for InWheel tempdir fix (#3063)
Copilot May 6, 2026
b846cee
chore: roll to 1.60.0-beta-1778142790000 (#3069)
Skn0tt May 7, 2026
18810d8
feat: add FormData class for form and multipart requests (#3060)
dgozman May 12, 2026
0ebdf2d
feat(assertions): add expect.soft() for collecting multiple failures …
Skn0tt May 12, 2026
93f3201
chore: roll driver to 1.60.0 (#3079)
Skn0tt May 18, 2026
0c81861
fix(documentation_provider): correct spelling "redundant" in function…
26rahulchoudhary May 18, 2026
d7ec09a
fix(assertions): render aria snapshot in its own section on expect fa…
Skn0tt Jun 8, 2026
7a387f2
chore: drop Conda distribution (#3091)
Skn0tt Jun 8, 2026
7a69477
Build driver from source instead of downloading from CDN
Skn0tt Jun 8, 2026
088fda1
CI: build driver once on Linux, share bundles as an artifact
Skn0tt Jun 8, 2026
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
6 changes: 5 additions & 1 deletion .azure-pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ extends:
inputs:
versionSpec: '3.9'
displayName: 'Use Python'
- task: NodeTool@0
inputs:
versionSpec: '24.x'
displayName: 'Use Node.js'
- script: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
Expand All @@ -60,7 +64,7 @@ extends:
targetPath: $(Build.ArtifactStagingDirectory)/esrp-build
steps:
- checkout: none
- task: EsrpRelease@9
- task: EsrpRelease@11
inputs:
connectedservicename: 'Playwright-ESRP-PME'
usemanagedidentity: true
Expand Down
15 changes: 11 additions & 4 deletions .claude/skills/playwright-roll/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Python port is hand-written code in `playwright/_impl/`, plus a generator (`

1. introspects the Python `_impl` classes via `inspect`,
2. emits typed wrapper classes into `playwright/{async,sync}_api/_generated.py`, and
3. diffs the introspected surface against `playwright/driver/package/api.json` (downloaded inside the new driver wheel).
3. diffs the introspected surface against `playwright/driver/package/api.json` (built into the new driver from source).

Anything in `api.json` that is missing or differently typed in `_impl/` causes generation to fail. Three resolutions:

Expand Down Expand Up @@ -52,18 +52,25 @@ There is sometimes no `vX.Y.0` tag for the latest release (the bots cut release
- If `python3-venv` is missing system-wide, use `uv venv env` instead, then `uv pip install --python env/bin/python --upgrade pip`. Don't try to `apt install` — sudo is denied in the harness.
- Always activate the venv before any `pip`, `pytest`, `mypy`, or `pre-commit` invocation.

### 2. Bump the driver and download it
### 2. Bump the driver and build it from source

```sh
# Edit setup.py
driver_version = "<new>" # e.g. "1.59.1"

source env/bin/activate
python -m build --wheel # downloads the new driver from cdn.playwright.dev
python -m build --wheel # clones microsoft/playwright @ v<new> and builds the driver from source
playwright install chromium # NOT --with-deps; sudo is denied
```

The wheel build prints `Fetching https://cdn.playwright.dev/builds/driver/playwright-<new>-linux.zip` and unpacks the driver under `playwright/driver/package/`. From this point, `playwright/driver/package/api.json` reflects the new release.
The wheel build clones `microsoft/playwright` at tag `v<new>` into
`driver/playwright-src`, runs `npm ci && npm run build`, and runs upstream's
`utils/build/build-playwright-driver.sh` to produce the per-platform driver
bundles (`driver/playwright-<new>-*.zip`), then unpacks the driver under
`playwright/driver/package/`. From this point,
`playwright/driver/package/api.json` reflects the new release. This requires
**Node.js, npm, git and bash** on PATH; the first build is slow (full upstream
build + per-platform Node downloads).

### 3. Identify the commit range

Expand Down
98 changes: 65 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,54 @@ concurrency:
cancel-in-progress: true

jobs:
build-driver:
name: Build driver
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Build driver bundles from source
run: |
VERSION="$(grep -oP 'driver_version = "\K[^"]+' setup.py)"
bash scripts/build_driver.sh "$VERSION"
- name: Upload driver bundles
uses: actions/upload-artifact@v4
with:
name: driver-bundles
path: driver/playwright-*.zip
if-no-files-found: error
# The bundles are already-compressed zips; skip re-compression.
compression-level: 0
retention-days: 1

infra:
name: Lint
needs: build-driver
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Download driver bundles
uses: actions/download-artifact@v4
with:
name: driver-bundles
path: driver/
- name: Verify driver bundles
shell: bash
run: |
count="$(ls driver/playwright-*.zip 2>/dev/null | wc -l)"
test "$count" -eq 6 || { echo "Expected 6 driver bundles in driver/, found $count"; ls -la driver/ || true; exit 1; }
- name: Install dependencies & browsers
run: |
python -m pip install --upgrade pip
Expand All @@ -43,6 +82,7 @@ jobs:

build:
name: Build
needs: build-driver
timeout-minutes: 45
strategy:
fail-fast: false
Expand Down Expand Up @@ -91,11 +131,21 @@ jobs:
browser: chromium
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Download driver bundles
uses: actions/download-artifact@v4
with:
name: driver-bundles
path: driver/
- name: Verify driver bundles
shell: bash
run: |
count="$(ls driver/playwright-*.zip 2>/dev/null | wc -l)"
test "$count" -eq 6 || { echo "Expected 6 driver bundles in driver/, found $count"; ls -la driver/ || true; exit 1; }
- name: Install dependencies & browsers
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -125,6 +175,7 @@ jobs:

test-stable:
name: Stable
needs: build-driver
timeout-minutes: 45
strategy:
fail-fast: false
Expand All @@ -138,11 +189,21 @@ jobs:
browser-channel: msedge
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Download driver bundles
uses: actions/download-artifact@v4
with:
name: driver-bundles
path: driver/
- name: Verify driver bundles
shell: bash
run: |
count="$(ls driver/playwright-*.zip 2>/dev/null | wc -l)"
test "$count" -eq 6 || { echo "Expected 6 driver bundles in driver/, found $count"; ls -la driver/ || true; exit 1; }
- name: Install dependencies & browsers
run: |
python -m pip install --upgrade pip
Expand All @@ -166,43 +227,14 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: xvfb-run pytest tests/async --browser=chromium --browser-channel=${{ matrix.browser-channel }} --timeout 90

build-conda:
name: Conda Build
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest, windows-2022]
runs-on: ${{ matrix.os }}
defaults:
run:
# `setup-miniconda` activates the env only for login shells; using
# `bash -el` (recommended by the action) ensures `conda` and the
# installed `conda-build` are on PATH on every OS, including Windows
# where the default shell is pwsh and skips the activation hooks.
shell: bash -el {0}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.12'
channels: conda-forge
miniconda-version: latest
- name: Prepare
run: conda install -n base "conda-build>=26" conda-verify
- name: Build
run: conda build .

test_examples:
name: Examples
runs-on: ubuntu-22.04
defaults:
run:
working-directory: examples/todomvc/
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/publish.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
contents: read # This is required for actions/checkout to succeed
environment: Docker
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Azure login
uses: azure/login@v2
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_DOCKER_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_DOCKER_TENANT_ID }}
Expand All @@ -28,8 +28,12 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Set up Docker QEMU for arm64 docker builds
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- name: Install dependencies & browsers
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ jobs:
- ubuntu-24.04
- ubuntu-24.04-arm
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -53,6 +57,10 @@ jobs:
docker exec "${CONTAINER_ID}" pip install -r local-requirements.txt
docker exec "${CONTAINER_ID}" pip install -r requirements.txt
docker exec "${CONTAINER_ID}" pip install -e .
# build.sh (above) already built the driver bundles into driver/ on the
# host. The repo is bind-mounted into the container, so this in-container
# wheel build reuses those bundles (setup.py skips the source build when
# the zip already exists) and therefore needs no Node.js in the image.
docker exec "${CONTAINER_ID}" python -m build --wheel
docker exec "${CONTAINER_ID}" xvfb-run pytest tests/sync/
docker exec "${CONTAINER_ID}" xvfb-run pytest tests/async/
Loading
Loading