Playwright is a browser automation framework that drives Chromium, Firefox, and WebKit and ships with its own test runner, @playwright/test. To get a project running, install the test package as a dev dependency, install the browser binaries, and run the test command. Once installed, every project's most important file becomes playwright.config.ts, because it controls where tests live (testDir), what browsers run them (projects), how the app starts (webServer), and how failures are reported.
The webServer block is especially useful when an AI agent or a developer needs to drive a full app during tests: it specifies a command, a URL Playwright should ping until it responds, and reuseExistingServer so that locally you can keep a dev server running while CI always spins a fresh one. baseURL lets tests write short paths like page.goto('/login') instead of full URLs, which makes the same suite portable between local, staging, and CI. Environment variables such as BASE_URL, USERNAME, and PASSWORD are read from process.env inside the config so credentials never have to be hardcoded.
Configuration is also where you decide on browser projects. A project is a named browser/device combination, so you can run the same specs under chromium, firefox, webkit, or an emulated mobile profile by configuring devices from the playwright package. Per-project use settings control viewport, locale, timezone, color scheme, permissions, and reduced motion, all of which help keep tests deterministic across machines. Other use keys worth knowing include headless/headed, video (e.g. 'retain-on-failure'), screenshot (e.g. 'only-on-failure'), trace (e.g. 'on-first-retry'), and ignoreHTTPSErrors for local dev environments.