TOPIC 55/6016 MINNOT STARTED

The editor workflow: the VS Code extension and running tests as you write

Install the Playwright extension in Visual Studio Code, run a test with one click, watch the browser, pick a locator from the page and fix a test without leaving the editor.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: the recipe on the counter beside the stove. A cook who walks to another room for the next line loses the place. A cook with the card beside the stove can read, stir and taste in one flow.

Tom writes Playwright tests for Daily List, a to-do list app. He edits in one window and runs a command in another. Each fix is a walk between rooms.

What it is: A is a program for writing code. Visual Studio Code, called VS Code, is a free editor. The lists your tests, runs them and shows the result next to the code. Pick locator is the tool in that extension that copies a locator from a click on the live page. A locator is how a test finds an element. Playwright is the free browser tool from Microsoft. Playwright Test is its runner. The extension is a front door to that same runner. It is not a different test engine.

Why it matters: Tom can change one line, run that test and see the browser before he forgets what he tried. A long walk to a terminal makes him guess instead.

The editor does not decide whether a test is good. The shared build is still the record of truth.

Kept simple: menu names move. The command names in this lesson come from the Playwright VS Code page checked for it.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are invented.)

PLAIN WORDS · 2 in this section
playwright
a free Microsoft tool that drives a browser for tests
locator
a pointer telling you where to find something

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 Writing, running and fixing a test in one place so each change gets feedback in seconds.

  1. Open the folder
  2. Run with a click
  3. Pick and read the locator
  4. Finish headless
Write, run and fix in one room

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The recipe on the counterThe test code in the editor
The stove beside itThe run button and the browser window
Tasting as you cookShow Browser and live locator highlighting
Serving the finished mealThe final headless run in the pipeline

WHERE THIS PICTURE STOPS

  • A kitchen is only a room. An editor does not make a test good.
  • Tasting at the stove is quick. A watched browser can hide faults that appear headless.
  • A cook can taste anywhere. The editor lives on one computer, so the pipeline is still the record of truth.

HOOK

Write, run and fix in one room.

REMEMBER IT THIS WAY

A story beat: one picture-line that carries the order or the cause.

The day Tom stopped walking between rooms: the add-on listed his tests, ran one with a click and showed what the browser did.

What each part of the trick stands for
In the trickWhat it stands for
Walking between roomsEach fix meant a walk between rooms
One clickruns them with one click and shows what the browser did

A watched browser can hide faults that appear headless, so the pipeline run is still the record.

TELL A FRIEND

It is like having the recipe and the stove in the same room, so you can read, stir and taste at once.

OFTEN MIXED UP WITH Debugging: inspector, UI mode and the trace viewer. The debugging lesson covers the Inspector, UI mode and the . This lesson covers the editor loop for writing and fixing.

Sources & standards — 3 sources
  1. Market practice

    VS Code (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.

    Describes the Playwright extension for VS Code. Vendor documentation, not a standard. · Checked 2026-11-06

    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.

  2. Market practice

    Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Test what the user sees, keep tests isolated, prefer role and text locators, use web-first assertions that retry, use TypeScript and ESLint to catch errors early, and run tsc --noEmit in the pipeline (search excerpt, page not opened)

    Recommends user-facing locators such as role-based ones over Cascading Style Sheets (CSS) or XPath, web-first assertions that retry, and avoiding fixed waits. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    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).

  3. Market practice

    Auto-waiting (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.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    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 — 3 sources
  1. Market practice

    VS Code (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.

    Describes the Playwright extension for VS Code. Vendor documentation, not a standard. · Checked 2026-11-06

    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.

  2. Market practice

    Best practices (Playwright documentation) ↗ — Microsoft (Playwright) · Test what the user sees, keep tests isolated, prefer role and text locators, use web-first assertions that retry, use TypeScript and ESLint to catch errors early, and run tsc --noEmit in the pipeline (search excerpt, page not opened)

    Recommends user-facing locators such as role-based ones over Cascading Style Sheets (CSS) or XPath, web-first assertions that retry, and avoiding fixed waits. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    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).

  3. Market practice

    Auto-waiting (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.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    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.