Skip to content
masterclass Buddy

Playwright · Command

playwright codegen

Playwright codegen records browser interactions and generates test code. It can also create assertions, locators, emulated sessions, and reusable authenticated states.

Last updated

Syntax

playwright codegen [URL]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Playwright Inspector
  • Pick Locator
  • --color-scheme
  • --geolocation
  • --lang
  • --timezone
  • --http-credentials
  • page.pause()

Source: Test generator | Playwright Python. Checked 2026-11-03.