Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 1.43 KB

ROLLING.md

File metadata and controls

18 lines (17 loc) · 1.43 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
pip install -e .
  • change the driver pin in DRIVER_VERSION: npm= the playwright-core npm version (e.g. 1.61.0) and rev= the commit it is built from (npm view playwright-core@<version> gitHead); refresh NODE_VERSION: python scripts/update_node_version.py
  • download the new driver: python -m build --wheel (fetches playwright-core via npm pack + the matching Node.js binary and assembles the bundle; no source build).
  • generate API from the docs. This needs a separate microsoft/playwright checkout used only for rolls, at the rev= commit of DRIVER_VERSION and clean (git -C ../playwright-for-python fetch origin && git -C ../playwright-for-python checkout --detach <rev>): PW_SRC_DIR=../playwright-for-python ./scripts/update_api.sh
  • run mypy playwright: every error in _generated.py points at an implementation method in playwright/_impl/ that lacks a new member or option. Implement it there, or record the difference in scripts/codegen/python_rules.js.
  • commit changes & send PR
  • wait for bots to pass & merge the PR