TypeScript, JavaScript, Python, Java or .NET: choosing a Playwright language
Playwright speaks several programming languages. See what stays the same, what changes with each one, and how a team can choose with a small trial instead of a guess.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: the same recipe written in several languages. The flour, the eggs, and the oven time stay the same. Only the words change. A cook who reads one language can bake the same cake.
Daily List is a to-do list app. Nina, the product owner, asks which programming language the browser tests should use. Tom, the tester, and Leo, the developer, tell her Playwright can do the same browser work in more than one language.
What it is: Playwright is a library that drives a real browser. This slice is the , the version of that library for one programming language. The browser work is shared. The around it is not. Selenium and Cypress also come in more than one language, and a snippet from one will not run in another.
Why it matters: The team will read these tests for years. A language they already know keeps reviews sharp and lets a new person help on day one. A language only one person can read becomes a bottleneck when that person is away.
A recipe is only read. A test language also brings its own runner, report, and install steps. Those differ even when the click means the same thing.
(SYNTHETIC / TRAINING ONLY: Daily List, its test site, and every person named here are made up.)
PLAIN WORDS · 5 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.
- snippet
- a small piece of text or code
- bottleneck
- a narrow point that slows everything
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 Seeing that the browser work is the same in every language, so the team can pick the language it reads best.
- List the team's languages
- Try one test in the top two
- Compare the tooling
- Write a decision record
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The cake recipe | The browser test |
| A language it is written in | A language binding |
| The flour and eggs | The shared Playwright core |
| The cook who reads the language | The team that must maintain the tests |
WHERE THIS PICTURE STOPS
- A recipe is only read. A test language also brings its own tools for running tests.
- Recipe words are all equal. Some Playwright features reach one binding before another.
- A cake is made once. Tests are kept for years.
HOOK
Same cake, many languages.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
Usually, pick the language your team already reads well, because each language does the same work in the browser.
| In the trick | What it stands for |
|---|---|
| Language | each does the same work in the browser |
| Team | the language the team already reads well |
If nobody on the team reads any of them well, the real question is who will learn one.
TELL A FRIEND
The same recipe written in four languages, baked by whoever reads one well.
OFTEN MIXED UP WITH What Playwright is, and how it drives a browser. The first lesson says what Playwright is. This lesson says which languages it speaks and how to choose.
Sources & standards — 6 sources
- Market practice
Supported languages (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
Library (Playwright documentation) ↗ — Microsoft (Playwright) · The library provides APIs for launching and interacting with browsers and can be used without the Playwright Test runner; with it you set up the browser, context and page yourself and have no built-in web-first assertions; the docs still recommend the @playwright/test runner for most end-to-end testing (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; read at the time of writing. 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.
- 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
Pytest plugin reference (Playwright documentation for Python) ↗ — 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
Getting started - Library | Playwright Python ↗ — 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.
PRACTISE AND KEEP
Sources for this topic — 7 sources
- Market practice
Supported languages (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
Library (Playwright documentation) ↗ — Microsoft (Playwright) · The library provides APIs for launching and interacting with browsers and can be used without the Playwright Test runner; with it you set up the browser, context and page yourself and have no built-in web-first assertions; the docs still recommend the @playwright/test runner for most end-to-end testing (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; read at the time of writing. 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.
- 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
Multithreading (Playwright documentation for Java) ↗ — Microsoft (Playwright) · Says Playwright for Java is not thread-safe, that objects should stay on the thread that created them, and that one Playwright instance per thread is fine (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.
- Market practice
Pytest plugin reference (Playwright documentation for Python) ↗ — 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
Getting started - Library | Playwright Python ↗ — 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.
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.