Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.11 KB

File metadata and controls

24 lines (20 loc) · 1.11 KB

Rolling Playwright-Python to the latest Playwright driver

  • 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
  • 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 (the playwright-core npm version, e.g. 1.61.0) and refresh NODE_VERSION: python scripts/update_node_version.py
  • download the new driver: python -m build --wheel (fetches playwright-core from npm + the matching Node.js binary and assembles the bundle; no source build)
  • generate API (needs a nearby microsoft/playwright checkout at v<new>): PW_SRC_DIR=../playwright ./scripts/update_api.sh
  • commit changes & send PR
  • wait for bots to pass & merge the PR

Fix typing issues with Playwright ToT

  1. API_JSON_MODE=1 node ../playwright/utils/doclint/generateApiJson.js > /tmp/api.json
  2. PW_API_JSON=/tmp/api.json ./scripts/update_api.sh