From dfd5b95ec8adc425b683df22148cb1c14bb01128 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 17 Jun 2026 09:52:02 -0700 Subject: [PATCH] Document --headed option, closes #2791 --- docs/contributing.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 11bb7aa8..3b45834c 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -113,12 +113,23 @@ You can pass extra ``pytest`` options after the browser name: just playwright chromium -k permissions just playwright-all -x -If you are not using ``just``, the equivalent Chromium commands are: +You can add the ``--headed`` option to have Playwright open a browser window that you can see while it runs the tests. This only works if you specify a browser, for example: + +.. code-block:: bash + + just playwright firefox --headed + +Combine this with ``-k`` to watch a specific test: + +.. code-block:: bash + + just playwright chromium --headed -k test_insert_row + +If you are not using ``just``, the equivalent ``uv run`` commands are: .. code-block:: bash uv run --group playwright playwright install chromium - uv run --group playwright pytest tests/test_playwright.py --playwright --browser chromium .. _contributing_using_fixtures: