The project layout and the config file
Learn what each folder and file in a Playwright project is for, and what goes in the config file: where tests live, the base address, and the browsers to run.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: the labelled drawers of a tidy toolbox. Screws live in one drawer and drills in another. You read the label and open the right drawer. You do not dump the box on the floor.
Daily List is a to-do list app. Tom's has a few folders and one settings file. Mei, the test lead, walks him through them. Tests go in one folder. Settings go in one file. Results go in another folder.
What it is: Playwright is a library that drives a real browser. This slice is the and the , usually named playwright.config.ts. Test configuration is the shared choices in that file: where tests live, the base URL, and which browsers run. Use options are the browser settings inside use. A setting in the wrong level is the mix-up. Selenium and Cypress also have config files, and the key names are not the same.
Why it matters: Without a , every test repeats the full address. When the address changes, Tom must edit every file. One line in the config fixes all of them, so two people cannot quietly point tests at two sites.
Toolbox drawers do not change how a drill behaves. This file does change how every test runs.
(SYNTHETIC / TRAINING ONLY: Daily List, its test site, and every person named here are made up.)
PLAIN WORDS · 3 in this section
- playwright
- a free Microsoft tool that drives a browser for tests
- selenium
- A free tool that drives a web browser for checks.
- cypress
- A free tool that drives a web browser for checks.
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Knowing where each setting lives, so one change in one place moves every test.
- Tests in the tests folder
- Runner settings at the top
- Browser settings in use
- Results in report folders
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The toolbox | The test project |
| A labelled drawer | A folder or a block in the config |
| The label on the drawer | The setting's name |
| Opening one drawer for the right tool | Changing one setting for every test |
WHERE THIS PICTURE STOPS
- Drawers do not change how a tool works. A config setting changes how every test runs.
- A toolbox has no wrong drawer for a label. A setting in the wrong block is silently ignored.
- A drawer can be opened by anyone. A config change needs a review.
HOOK
Right setting, right drawer.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
If a setting must hold for every test, change it once in the and every test follows.
| In the trick | What it stands for |
|---|---|
| Config file | holds the settings that every test shares |
| One change | every test follows the setting |
A setting that only one test needs may not belong in the shared file.
TELL A FRIEND
A tidy toolbox where each drawer has a label, so you never dig for a tool.
OFTEN MIXED UP WITH Install Playwright and run your first test. The setup lesson creates the project and runs a first test. This lesson explains the files it made and the config settings.
Sources & standards — 5 sources
- Market practice
Configuration (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
- Market practice
Configuration (use) (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
- Market practice
Installation (Playwright documentation) ↗ — Microsoft (Playwright) · Installation / intro: actual setup prompts, generated config/tests, selected browser projects, reports and version-matched browser installation reviewed 6 November 2026. Current source supports Node 22/24/26 lines; no claim that every platform/scaffold option was executed.
Actual complete Installation/intro article inspected during Phase 1 on 6 November 2026, including setup prompts, generated files, selected projects, reports and browser update/install contract. Source inspection is not a claim that every scaffold command, supported operating system or version was executed. Documentation licence CC BY 4.0 was separately reviewed; version and local-execution limits are in the v45 audit.
- Market practice
Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Test user-visible behaviour, keep tests isolated, prefer role and text locators over fragile selectors, and use web-first assertions (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. A second search on 2026-10-20 returned this page for its title and matched the described content; the page was still not opened (search excerpt, page not opened).
- Market practice
Retries ↗ — Playwright (Microsoft) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
PRACTISE AND KEEP
Sources for this topic — 5 sources
- Market practice
Configuration (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
- Market practice
Configuration (use) (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
- Market practice
Installation (Playwright documentation) ↗ — Microsoft (Playwright) · Installation / intro: actual setup prompts, generated config/tests, selected browser projects, reports and version-matched browser installation reviewed 6 November 2026. Current source supports Node 22/24/26 lines; no claim that every platform/scaffold option was executed.
Actual complete Installation/intro article inspected during Phase 1 on 6 November 2026, including setup prompts, generated files, selected projects, reports and browser update/install contract. Source inspection is not a claim that every scaffold command, supported operating system or version was executed. Documentation licence CC BY 4.0 was separately reviewed; version and local-execution limits are in the v45 audit.
- Market practice
Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Test user-visible behaviour, keep tests isolated, prefer role and text locators over fragile selectors, and use web-first assertions (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. A second search on 2026-10-20 returned this page for its title and matched the described content; the page was still not opened (search excerpt, page not opened).
- Market practice
Retries ↗ — Playwright (Microsoft) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.