- 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_SHA(themicrosoft/playwrightcommit SHA to build from) - build the new driver from source:
python -m build --wheel(clonesmicrosoft/playwrightat that commit and builds it; requires Node.js, npm, git and bash) - generate API:
./scripts/update_api.sh - commit changes & send PR
- wait for bots to pass & merge the PR
cd playwrightAPI_JSON_MODE=1 node utils/doclint/generateApiJson.js > ../playwright-python/playwright/driver/package/api.json./scripts/update_api.sh