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.
- Write down what the test proves
- Map the calls
- Move one slice
- Retire the old test
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Boxes you carry | The ideas each test proves |
| The broken lamp you leave | Fixed pauses and weak finders |
| Living in the old house for now | Running both suites |
| A list on the fridge of where things go | The 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.
| In the trick | What it stands for |
|---|---|
| Ask | what each old test was checking |
| Carry | a migration map pairs each old call with the Playwright call that does the same job |
| Leave | leaves out the waits and the fragile finders |
| Keep | keep 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
- 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.
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
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.
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
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.
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
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)
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
- 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.
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
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.
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
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.
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
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)
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.
- 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.
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
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.
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.
- 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.
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
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.
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.