Skip to main content

Playwright Tools

Experimental

Playwright Tools are experimental in the Community Alpha. On Windows, launching, navigation and Stop tool are validated, but native window visibility and what happens when you close the tool's own window are not yet qualified. On Linux, tools are experimental and community-tested.

Purpose: open Playwright's own Codegen recorder or UI Mode from the dashboard without switching to a terminal.

Prerequisites: @playwright/test is installed in your project, and the browsers you want to use are installed for Playwright (for example with npx playwright install).

Watcher starts and stops these tools. They are Playwright's native tools; Watcher does not change how they work.

Record a new test (Codegen)​

  1. In Playwright Tools, select Record New Test.
  2. Optionally choose a Browser: Playwright default, chromium, firefox or webkit.
  3. Optionally enter a Starting URL. It must be an http or https URL without a username or password.
  4. Select Launch.

Expected result: the session shows Codegen with its state, and Playwright's recorder opens.

Copy the generated code from Playwright yourself. Watcher does not save it to your project, and stopping the tool discards unsaved code.

Codegen can run while a managed test run is active.

Open UI Mode​

  1. Select Open UI Mode.
  2. Optionally choose a Config source: Default config, or a Playwright-aware package script whose --config should be used.
  3. Optionally choose a Project, or leave As configured.
  4. Select Launch.

Expected result: the session shows UI Mode with its state, and Playwright UI Mode opens.

UI Mode and a managed run are mutually exclusive: you cannot open UI Mode while a run is active, or start a run while UI Mode is open.

If your project has no explicit config in the chosen script and not exactly one root Playwright config, UI Mode cannot determine which config to use; choose a script with --config.

Session states and stopping​

Only one tool session runs at a time. A session moves through starting, open, stopping, then closed or failed.

  • Select Stop tool to end the session. Watcher terminates the tool's process tree.
  • When a session ends, select Dismiss to hide it.
  • Expand Diagnostic output to see the last lines the tool printed.

Pressing Ctrl+C in Watcher's terminal also stops an active tool session.

What Watcher keeps​

Tool sessions are temporary. They are not saved to run history, and Codegen output is never stored. UI Mode writes its test output into a temporary directory in your operating system's temp folder, not into your project's configured output folders. Watcher removes that directory after the session ends, unless it cannot confirm that the tool's processes have exited.

If no window appears​

Native window behavior is experimental. Check Diagnostic output, select Stop tool, and report your environment so we can investigate.