TOPIC 57/6016 MINNOT STARTED

Moving to Playwright from Puppeteer, Protractor, Selenium or Cypress

Move an old browser test suite to Playwright in small safe steps: carry the ideas across, leave the old habits behind and keep both suites running until the new one matches.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: moving house while you still sleep in the old one. You carry what you use. You leave the broken lamp. You do not camp in the street while the new house has no bed.

Tom inherits browser tests for Daily List, a to-do list app. They were written for Puppeteer, a library that drives Chrome from code. Mei asks him to move them to Playwright. Other teams arrive from Selenium, Cypress or Protractor.

What it is: Playwright is a free program, made by Microsoft, that drives real browsers from test code. A migration is that move from one tool to another. A pairs each old call with the Playwright call that does the same job. An points at one element found at one moment. Playwright prefers a locator, which finds the element again each time you use it. An incremental migration moves a slice at a time. The old suite and the new suite both run until the last slice moves. Do not mix a line-by-line translation with a migration. Translating every wait keeps the old problems.

Why it matters: a big rewrite stops the team for weeks and hides new mistakes. Small slices keep Daily List covered on the days you are mid-move. The highest-value journeys move first. A test nobody needs stays behind.

A house move can finish in a weekend. A suite move takes as long as the slices take, and the tests keep running the whole time.

Kept simple: Playwright publishes migration pages for Puppeteer, Protractor and Testing Library. No Selenium or Cypress guide page turned up in the docs search.

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

PLAIN WORDS · 6 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.
protractor
An older tool for testing web apps written with Angular.
locator
a pointer telling you where to find something
incremental
done a piece at a time

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 A careful move of an old : carry the ideas, leave the habits, keep the old suite until the new one matches.

  1. Write down what the test proves
  2. Map the calls
  3. Move one slice
  4. Retire the old test
Carry the ideas, not the lamp

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
Boxes you carryThe ideas each test proves
The broken lamp you leaveFixed pauses and weak finders
Living in the old house for nowRunning both suites
A list on the fridge of where things goThe migration map

WHERE THIS PICTURE STOPS

  • A house move happens once. A suite move takes weeks.
  • A box is not a test. A test still has to be run and checked.
  • A house has a clear end day. A suite may keep a few old tests for a long time.

HOOK

Carry the ideas, not the lamp.

REMEMBER IT THIS WAY

A sequence: the real steps, in order.

Ask what the old test checked. Carry that idea across, leave the waits behind, and keep the old suite running until the new one matches.

What each part of the trick stands for
In the trickWhat it stands for
Askwhat each old test was checking
Carrya migration map pairs each old call with the Playwright call that does the same job
Leaveleaves out the waits and the fragile finders
Keepkeep running the old suite

TELL A FRIEND

You move house in boxes. You carry what you use, leave the junk and live in the old house until the new one is ready.

OFTEN MIXED UP WITH Keeping a regression suite healthy. The healthy suite lesson is about looking after a suite in one tool. This lesson is about the work of moving it to another tool.

Sources & standards — 4 sources
  1. Market practice

    Migrating from Puppeteer (Playwright documentation) ↗ — 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.

    Describes moving from Puppeteer: most calls carry over, ElementHandle use is discouraged in favour of Locator, setViewport becomes setViewportSize, cookie methods move to the browser context, waiting for network idle is not useful in most cases, and Playwright Test is the recommended runner. Vendor documentation for one tool. · 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

    Migrating from Protractor (Playwright documentation) ↗ — 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.

    Describes moving from Protractor: ElementFinder maps to Locator, waitForAngular maps to auto-waiting, no Selenium driver manager is needed, and a worked example converts an AngularJS to-do list test. Vendor documentation for one tool. · 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.

  3. Market practice

    Migrating from Testing Library (Playwright documentation) ↗ — 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.

    Describes moving from DOM, React and Vue Testing Library: queries become locators, user events become locator actions, waitFor is usually unneeded because web-first assertions retry, expect.poll covers non-UI conditions, and within() becomes locator chaining. Vendor documentation for one tool. · 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.

  4. Market practice

    ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Section 6.2, Benefits and Risks of Test Automation: a tool needs ongoing effort to give lasting benefits, and its risks need analysis and mitigation (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)

    The examinable statement of what a foundation-level tester is expected to know: six chapters, 64 learning objectives, each tagged K1 Remember, K2 Understand or K3 Apply, plus the test-design techniques the qualification names and groups as black-box, white-box and experience-based.

    Used here for the test-craft questions a Payment Quality Assurance Analyst and a Production Support Analyst are asked. It is cited for what the syllabus says a tester must be able to do, never as a rule about how payments work. · Checked 2026-11-07

    v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.

    Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.

    The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.

    The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.

    7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.

PRACTISE AND KEEP

Sources for this topic — 8 sources
  1. Market practice

    Migrating from Puppeteer (Playwright documentation) ↗ — 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.

    Describes moving from Puppeteer: most calls carry over, ElementHandle use is discouraged in favour of Locator, setViewport becomes setViewportSize, cookie methods move to the browser context, waiting for network idle is not useful in most cases, and Playwright Test is the recommended runner. Vendor documentation for one tool. · 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

    Migrating from Protractor (Playwright documentation) ↗ — 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.

    Describes moving from Protractor: ElementFinder maps to Locator, waitForAngular maps to auto-waiting, no Selenium driver manager is needed, and a worked example converts an AngularJS to-do list test. Vendor documentation for one tool. · 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.

  3. Market practice

    Migrating from Testing Library (Playwright documentation) ↗ — 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.

    Describes moving from DOM, React and Vue Testing Library: queries become locators, user events become locator actions, waitFor is usually unneeded because web-first assertions retry, expect.poll covers non-UI conditions, and within() becomes locator chaining. Vendor documentation for one tool. · 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.

  4. Market practice

    ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Section 6.2, Benefits and Risks of Test Automation: a tool needs ongoing effort to give lasting benefits, and its risks need analysis and mitigation (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)

    The examinable statement of what a foundation-level tester is expected to know: six chapters, 64 learning objectives, each tagged K1 Remember, K2 Understand or K3 Apply, plus the test-design techniques the qualification names and groups as black-box, white-box and experience-based.

    Used here for the test-craft questions a Payment Quality Assurance Analyst and a Production Support Analyst are asked. It is cited for what the syllabus says a tester must be able to do, never as a rule about how payments work. · Checked 2026-11-07

    v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.

    Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.

    The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.

    The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.

    7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.

  5. Market practice

    Network (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 route.continue, route.fulfill and route.abort, blocking images, that the most recently registered matching route takes priority, route.fallback, and that service workers can bypass routing. Vendor documentation for one tool. Practitioner or vendor guidance, 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.

  6. Market practice

    Route (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: continue, fallback, fetch, fulfill and headers. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Reference for the route object: fulfill with status, body, headers or json, fetch to perform the real request and change it, continue with changed headers or method, abort with an error code, and fallback to the next handler. Vendor documentation for one tool. Practitioner or vendor guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: continue, fallback, fetch, fulfill and headers. 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.

  7. Market practice

    Application programming interface (API) testing (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.

    Shows the request fixture: a test takes request as an argument and calls post and get on it. Shows a base address and extra headers set in the config use block, and that an object passed as data is sent as JavaScript Object Notation (JSON). Says requests through the browser context share cookies with the page. Vendor documentation for one tool. Practitioner or vendor guidance, 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.

  8. Market practice

    Cypress to Playwright migration: A step-by-step guide ↗ — TestDino blog · Mapping rows from a migration guide (search excerpt, page not opened); route fulfill/abort behaviour is in registered Playwright network and Route docs. Cypress-side wording not checked against Cypress docs.

    Practitioner mapping of Cypress commands to Playwright (secondary, not official). · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). 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.

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.