- checkout repo:
git clone https://github.com/microsoft/playwright-python - make sure local python is 3.10 or newer
- create virtual environment, if don't have one:
python -m venv env
- create virtual environment, if don't have one:
- activate venv:
source env/bin/activate - install all deps:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pre-commit install
pip install -e .
- change the driver pin in
DRIVER_VERSION(theplaywright-corenpm version, e.g.1.61.0) and refreshNODE_VERSION:python scripts/update_node_version.py - download the new driver:
python -m build --wheel(fetchesplaywright-corefrom npm + the matching Node.js binary and assembles the bundle; no source build) - generate API (needs a nearby
microsoft/playwrightcheckout atv<new>):PW_SRC_DIR=../playwright ./scripts/update_api.sh - commit changes & send PR
- wait for bots to pass & merge the PR
API_JSON_MODE=1 node ../playwright/utils/doclint/generateApiJson.js > /tmp/api.jsonPW_API_JSON=/tmp/api.json ./scripts/update_api.sh