r/Playwright • • 15d ago

I made Playwright 3.5x faster 🔥

Thumbnail
gallery
127 Upvotes

I have a weird obsession with making stuff run faster, even when it seems practically impossible to do so, which was the case with Playwright.

I thought most of my tests were slow because my app or the way I designed my tests sucked, so I took every measure I could to improve my e2e suite's speed. I saw a lot of improvements by simply "doing things right", like using data-testid selectors, running tests in parallel, caching frontend builds, seeding data efficiently, etc.

Eventually, I hit a wall, and I started wondering how much of that wall was Playwright's fault. My first instinct, like any good vibecoder, was to ask Claude to rewrite the entire thing in Rust, to which he smartly replied that it would be pointless after running some benchmarks.

I didn't know what to do, so I (and Claude) came up with a bunch of ideas for how to speed up tests, from preparing your next test run while the current one is running to ignoring CSS animations. I had GPT 6 Astra write down 120 potential ideas for improving speed, of which only a few actually worked out without compromising functionality, in total I had 2 agents running everyday for almost an entire week. And this is the result:

Flashwright, a fork of Playwright that keeps the API almost identical while adding some performance tricks and QoL features.

I benchmarked it against Playwright across its own example suites and a bunch of other scenarios:

  • Playwright's TodoMVC example suite: 3670 → 1011 ms (1 worker), 1812 → 734 ms (4 workers)

  • At least 2× faster in every scenario, 2.86× on average across the benchmark scenarios

  • A suite where every third test fails: 4334 → 1154 ms

It passes all 2616/2616 tests from Playwright's own test suite, which means anyone can probably use it as a drop-in replacement.

More benchmarks and installation instructions can be found in the repo: https://github.com/xcodebeast/flashwright


r/Playwright • • Apr 23 '26

Playwright Cheatsheet

Post image
115 Upvotes

Full web version also available here:

https://www.webfuse.com/playwright-cheat-sheet


r/Playwright • • Sep 11 '25

Docs are so overwhelming... Made a Playwright Cheatsheet!

107 Upvotes

Seriously... every time I need to look up something in the Playwright docs, I open like 10 pages to put together what I need to know to solve my problem. And... the doc pages... they are huge! Plus, I can't remember which commands return promises and need await and which one don't! 🧐

So I made a Playwright Cheatsheet! 🙂

  • all the most common commands and usage

  • tiny but useful code snippets to copy

  • and SEARCH!

Please enjoy! Bookmark it. Print it as a PDF if you want.

Updates (Sept 15, 2025):

Huzzah! I've rolled out some improvements after the feedback from the community!

- Added assertion commands
- Added python sync and async too
- Fixed some issues with search
- Improved layout for mobile resolution

💬 Let me know if there's an incorrectness or feedback to improve it.

And yes - I know I know, AI could help you - but most of them aren't great at knowing what's deprecated!

Disclaimer: I do work for a test automation company! But this is not a promo - just wanted to share something I made because I got really frustrated with the docs.


r/Playwright • • Dec 10 '25

Debbie was fired

105 Upvotes

I am still shocked. Does Microsoft want to close the project?

https://debbie.codes/blog/laid-off-what-now/

How can you fire somebody like her?


r/Playwright • • May 25 '26

Built my first Playwright Automation Framework using TypeScript 🚀

Post image
79 Upvotes

I recently started learning QA Automation and built my first Playwright testing framework using TypeScript.

Features:

  • Page Object Model (POM)

  • HTML Reports

  • Screenshots on failure

  • Cross-browser testing

  • Reusable architecture

This project helped me better understand automation testing structure and scalable test organization.

I’d really appreciate any feedback or suggestions from experienced QA engineers 🙌

GitHub:
https://github.com/ahmadistatieh/playwright-automation-framework


r/Playwright • • Feb 04 '26

New AI Skill: Playwright Best Practices

Post image
74 Upvotes

Hey folks,

today we are releasing a brand new AI skill to help AI agents be really smart when writing tests, debugging them, or anything Playwright-related really.

This is a very comprehensive skill, covering everyday topics like fixing flakiness, authentication, or writing fixtures... to more niche topics like testing Electron apps, PWAs, iFrames and so forth. It should make your agent much better a writing, debugging and maintaining Playwright code.

for whoever didn't learn about skills yet, it's a new powerful feature that allows you to make the AI agents in your editor/cli (Cursor, Claude, Antigravity, etc) experts in some domain and better at performing specific tasks.

You can install it by running

npx skills add https://github.com/currents-dev/playwright-best-practices-skill

The skill is open-source and available under MIT license at https://github.com/currents-dev/playwright-best-practices-skill -> check out the repo for full documentation and understanding of what it covers.

We're eager to hear community feedback and improve it :)

Thanks!


r/Playwright • • Jun 25 '26

I built a dashboard for Playwright reports across runs: history, flaky rate, embedded trace viewer (open-source + self-hostable)

Thumbnail
gallery
53 Upvotes

Playwright's HTML report is great for a single run, but it resets every time. I wanted one level up: push every CI run somewhere and actually track pass rate, trends and flaky tests over time, so I built kinora.

What it does:

  • One dashboard across projects and over time: pass rate, run count, duration, sparkline trends, one colored strip per run

  • Per-test flaky rate and fail rate computed across the run history, with an "unstable only" filter and "newly broken / newly flaky since last run"

  • Failures get a "View trace" button that opens the full Playwright trace (DOM / timeline / network / console) inline, no download or unzip

  • Alerts on new failures and regressions (Slack, email, webhook)

There's also a desktop app: a local Playwright trace viewer that opens any trace.zip with no account, plus the same account dashboard if you sign in. Handy when you just want to drag-drop a trace instead of npx playwright show-trace

Setup is a reporter you add to playwright.config, CI pushes results to a kinora server.

Open-source (FSL-1.1), self-host free forever with docker-compose, or a hosted version if you don't want to run it.

Repo: https://github.com/Kinora-dev/kinora

Site: https://kinora.dev

Built this scratching my own itch, would love feedback from people running big Playwright suites: what do you track today that this is missing?


r/Playwright • • 29d ago

Manual tester with basic coding, now expected to write Playwright tests with Claude Code. Anyone going through this, how are you doing it?

52 Upvotes

Manual tester (~5 years exp) with basic coding and have no experience with test frameworks like Playwright or Selenium.

Currently, my devs are shipping a lot faster with Claude code, and we only have 2 automation engineers. Leadership now wants us manual testers to also contribute to the automation test suite. So I looked up low-code tools, but the company already bought Claude licences, so the expectation is Claude + Playwright.

I tried writing a few tests. Claude tells me they work and they pass, but I can’t tell if the tests are good or, if they’ll break next sprint. One of our SDETs helped me review them once or twice, but I can’t keep pulling him in.

So fellow manual testers who have been through this recently:

Are you able to write automation scripts with Claude? SDET help, or trial and error with AI?

When a test breaks, who fixes and maintians it, you with Claude or the SDETs help?

Is the solution working for you, or what challenges are you facing to make it work? How do I solve them?


r/Playwright • • May 23 '26 Bravo

Playwright was the entire reason I broke into QA from a non-tech background. Here's what I learned the hard way.

49 Upvotes

I switched into QA from a non-tech background a few years ago. The thing that actually got me hired wasn't the bootcamp I considered, wasn't ISTQB, wasn't a CS conversion course. It was a portfolio repo with a working Playwright suite in CI.

Posting this because I see a lot of "how do I break into QA" threads here and the answers usually drift toward ISTQB or Selenium tutorials, and I think the honest version is more useful. If you're trying to do the same thing, here's what worked and what I'd skip.

What worked
Learning just enough JavaScript to read and write Playwright tests. Not full-stack JS. Not React. Not even all of Node. Variables, async/await, npm, basic Promise handling. About 2 weeks of focused study with JavaScript.info and the MDN docs.
Picking ONE public demo app and going deep on it instead of building five tutorial projects. I used a public e-commerce demo. Wrote ~25 tests against it covering login, checkout, search, edge cases. That single repo did more for my CV than the previous year of certifications.
Spending more time on the README than on any individual test. The README is the document a hiring manager actually reads. Mine had a "what I learned building this" section , initial 30% flake rate, refactored from CSS selectors to getByRole, suite now stable across 200+ CI runs. That paragraph got mentioned in three different interviews.
Getting it into GitHub Actions early. Even a minimal playwright.yml running on every PR was enough to demonstrate "I understand CI exists and I've used it." Most QA candidates I've since interviewed alongside don't have this.

What I wasted time on
ISTQB Foundation. £200 and about 40 hours. Has not come up in a single interview since. The certificate is mostly invisible to modern QA Engineer hiring.
A Cucumber/Gherkin tutorial that taught me a syntax I've used precisely never on the job. If your team uses it, learn it in an hour.
Selenium. Half-finished a Selenium + Java project before realising the job market for Selenium-only roles is shrinking and Playwright was the better long-term bet. Switched, never looked back.
Doing a fifth tutorial project instead of going deeper on the second one. Volume of projects is not the move. Depth is.
The thing nobody told me about interviews
When asked "how do you handle flaky tests," candidates who say "I add retries" are filtered out. Candidates who say "I don't, I figure out what's actually flaky , usually it's a race condition between an API call and a UI state, sometimes it's a bad selector. I'd open the trace, look at the network panel, and work backwards" get hired. That single answer mattered more than half my CV.
Also: in 2026 hiring, "what AI tools are you using in your QA workflow" has become a real question. Claude Code, the Playwright MCP server, agent-driven testing , these are differentiators now. Six months ago they were curiosities. The candidates who can talk about how they've used these are increasingly the ones getting offers.
The salary thing
The single most expensive mistake I almost made was anchoring too low on my first QA Engineer salary. Don't take £30-35k for an automation-capable role with a real portfolio. The bottom of the actual market for automation-capable QA in the UK in 2026 is ~£42k. London is £45-55k for a first job with a portfolio repo. Anyone who tells you "just take what's offered for the experience" is costing you £3-8k/year compounded over your career.

Anyway , happy to answer questions if you're trying to do the same. The Playwright community has been generous to me and I've been writing some of this stuff down in longer form because I keep getting the same DMs.


r/Playwright • • Dec 02 '25

What’s your #1 trick to reduce flakiness in Playwright tests? Let’s build a community list.

48 Upvotes

No matter how good Playwright is, some tests still end up flaky — especially on CI. Trying to gather community wisdom here:

What’s the single best thing you’ve done that dramatically reduced flakiness?

Examples I’m thinking of:

  • Using test retries

  • Expect polling

  • Switching to locators instead of selectors

  • Using fixtures correctly

  • Network isolation

  • Stabilizing API calls

  • Slowing down UI transitions with hard waits (last resort)

I want to create a list of real-world techniques developers/QA engineers use today.

What actually worked for you?


r/Playwright • • Feb 17 '26

17 Playwright Mistakes You Should Avoid

Thumbnail
elaichenkov.github.io
47 Upvotes

Here is a list of common Playwright pitfalls I keep seeing and how to avoid them. Covers everything from bad selectors to async handling.

Let me know if I missed any major ones


r/Playwright • • Dec 09 '25

What’s the one thing you wish you knew before building a large Playwright test suite?

45 Upvotes

We’re currently scaling up our Playwright test coverage across multiple apps, and it’s starting to get real — more test data, more UI churn, more CI delays.

I’ve already hit a few lessons the hard way (like the importance of using "data-testid" early and not mixing concerns inside test files).

But I’d love to hear from people who’ve been through this:

  1. What’s one thing you wish you had done differently when your Playwright suite grew from 50 to 500+ tests?

  2. Any hard-learned lessons around test flakiness, trace viewer usage, test architecture, or CI speed?

Anything you’d go back and fix if you had the chance?

Let’s build a thread that saves future devs and testers a ton of pain.


r/Playwright • • Jun 01 '25

Playwright monitoring library

44 Upvotes

I just released my Playwright monitoring library, originally built for my personal use case which was collecting data while going through application on PROD environment. This tool tracks performance, catches showstoppers, and generates comprehensive reports.

https://www.npmjs.com/package/playwright-sniff

Key features:

  • Performance monitoring for all actions

  • Showstopper detection (5xx responses and actions/assertions you set)

  • Network request/console tracking

  • Generating HTML report

Perfect for production testing where you need to gather insights without breaking your test flow. It may be useful to someone, or maybe not, just wanted to share it.

If you have any feedback, ideas for improvement or issues don't hesitate to tell me, it's a 1.0.0 version :)


r/Playwright • • Jun 03 '26

Today captchas are no longer a problem for AI Web Agent

41 Upvotes

Websites weren’t built for AI agents, and most still rely on old anti-bot systems.

I built invisible_playwright: a stealth Firefox that passes modern fingerprinting and anti-bot checks at the engine level.

GitHub:
https://github.com/feder-cr/invisible_playwright

AI agents are becoming real web users. The web needs to catch up.


r/Playwright • • Mar 14 '25

🛠 Is Playwright the best alternative to Selenium in 2025?

40 Upvotes

Hey everyone,

I’ve been using Selenium for browser automation, but I’m considering switching to Playwright. My goal is to automate interactions with browser extensions (password managers, wallets, etc.) while ensuring automation is as human-like and undetectable as possible.

A few key questions: 1️⃣ How well does Playwright compare to Selenium in terms of avoiding automation detection? 2️⃣ Does Playwright natively randomize interactions (click positions, mouse movements, delays), or should I handle this manually? 3️⃣ How well does Playwright support working with browser extensions?

Would love to hear insights from experienced Playwright users. Thanks!


r/Playwright • • Apr 24 '26

If you haven't already, learn Playwright MCP

39 Upvotes

tl;dr - If you're not using Playwright w. MCP .. what are you even doing? This is an amazing tool that does so much. Get on it.

<<>><<>><<>><<>><<>>

I blocked. out a couple of hours after lunch today and finally got around to learning how to use Playwright MCP. Needless to say, I'm legit blown away. Here's what I did:

Pre Requisite

  • VS Code

  • Playwright - latest

Steps

  1. Followed this tutorial (YouTube) .. amazing instructor!!

  2. Set up Playwright MCP in my VS Code

  3. Found a simple form to use

  4. Used the chat prompt to automate the form -- SUCCESS!!

  5. Then I had it modify the javascript test it generated

  6. After debugging a few errors I had in my set up, I re-ran the tests with success

  7. Then I got creative and had the system re-write test addressing all potential variants

Results

  1. I had the PW-MCP generate tests covering use, abuse, and misuse cases

  2. I manually refactored the test so it reads a little better. That was a quick 10 minute fix

  3. It generated tests for Functionality, Accessibility, Performance, Security, and so on

  4. When completed, I had the prompt generate a report of what was done and recommendations


r/Playwright • • Sep 15 '26

playwright 1.59 is basically built for agents now, not people running tests

37 Upvotes

Been going through the 1.59 changelog today and it's pretty clearly not written with a person in mind anymore. browser.bind() lets an agent attach to a browser that's already running and keep the same auth state instead of relaunching one, there's a CLI debugger so something can step through a failing test without ever opening a GUI, and the trace command lets it read a trace file straight from the terminal. Basically every headline feature in this release assumes the thing driving the browser and reading the failure output isn't a person sitting there watching a headed run.

Kind of a weird moment honestly. I spent a long time getting good at reading the trace viewer, watching the video replay frame by frame, catching the one screenshot where a modal was covering the button the whole time. Now there's a CLI flag specifically so an agent can do that part without opening any of it visually. I don't think that means QA goes away, if anything I think it means someone still has to check that the agent's explanation of "this failed because X" is actually right and not just the first plausible reason it landed on. Agents are not immune to convincing themselves of the wrong root cause, they just do it faster and with more confidence than a tired human at 5pm.

Anyway, has anyone actually plugged an agent into browser.bind() yet for real work, not just a demo. Curious if the shared session thing holds up once you have more than one client attached at a time.


r/Playwright • • May 05 '26

Designing Playwright Tests That Survive UI Refactors

Thumbnail
currents.dev
37 Upvotes

Hey folks, back with another article - this time about how to design tests that survive when the UI is refactored.

TLDR: Learn why UI refactors keep breaking Playwright tests even when the features work fine.

It covers the coupling patterns that make suites fragile and ranks selectors by what actually survives design system changes. There's also content on structuring page objects so migrations don't cascade into dozens of test failures.


r/Playwright • • Apr 16 '26

Testing Authentication with Playwright: The Complete Guide

Thumbnail
currents.dev
37 Upvotes

We put together a complete guide to testing authentication with Playwright.

It covers:
🔹 Credential anti-patterns you hit at scale
🔹 storageState architecture and per-worker isolation
🔹 Multi-user and multi-role setups
🔹 OAuth mocking vs real provider testing
🔹 Magic links
🔹 SSO
🔹 Multi-tenant isolation
🔹 TOTP-based MFA and session expiry
🔹 Debugging auth failures
🔹 CI/CD secrets management
🔹 Compliance and observability

Dealing with auth can be a pain in the ass, hope the content here can be helpful and make it a bit easier.


r/Playwright • • 21d ago

I put Claude Code inside JMeter via an in-app MCP server. Now I describe load tests in plain English and it builds, runs and debugs them

36 Upvotes

I'm a senior engineer at a product company. No dedicated performance team, so load testing lands on us, and every time I opened JMeter I had to relearn it: proxy recorder, certificates, extractors, CLI runs, reading the dashboard.

So I built a JMeter plugin that adds an AI assistant (Claude Code) as a side drawer inside the JMeter window. JMeter itself is unchanged and the .jmx files still run on plain JMeter or in CI.

What you can do:

• Build tests in plain English: "Login, open dashboard, download invoice, 2 users, 3 loops". The test plan is built live in the tree while you watch.

• Edit by asking: "Change threads to 5, add 2 s think time", or right-click any element and pick "Ask Claude about it".

• Record without a proxy: it opens Chrome and captures traffic through the DevTools Protocol, so browsing is full speed. Click Done and it becomes a test with transactions, and static files and third-party calls are filtered out.

• Import any HAR from your browser as a test plan.

• Run the right way, see it in the GUI: runs use non-GUI mode (jmeter -n), but results stream live into your Summary Report and View Results Tree.

• Fix failures: it reads the errors, finds missing tokens or IDs, and adds the extractors.

Reports that explain why:

On top of the standard dashboard, every run gets a report with:

• concurrency over time (users alive vs requests actually in flight)

• a timeline lane per virtual user

• each user's first failure separated from the follow-on errors it caused

• other threads hitting the same endpoint or same account within 2 s ("2 threads used the SAME account 252 ms apart")

• per-account failure rates, to spot a bad test-data row

• whether the error rate grows with load

Passwords and tokens are never written to results or reports.

Write-up: Medium Article

What part of your JMeter workflow would you most want automated?


r/Playwright • • Aug 24 '26

Playwright MCP vs Playwright CLI: the comparison everyone gets wrong

36 Upvotes

Most threads compare Playwright MCP and Playwright CLI purely on token consumption(1, 2, 3). In my experience, there's a far more important difference that nobody talks about.

The real question is: can your AI agent attach to a running e2e test?

Here's why that matters. A good e2e test already does the hard part for you. It authenticates, sets up all the API mocks, and drives the app into the exact state you care about. When something goes wrong on the page, you don't want the agent spinning up a blank browser and guessing how to reach that page. You want to hand off the test-constructed page to the agent and let the agent play with it.

  • Playwright CLI: run the test with --debug=cli, it prints a session name, and playwright-cli attach <session> connects the agent straight into the paused test. Then the agent can step over the app, inspect the rendered UI, and run in-page evaluations.

  • Playwright MCP: only launches or attaches to a browser. It has no way to attach to a running test session.

So if you have many e2e tests + auth + network mocks, Playwright CLI is the clear winner for your setup, regardless of token counts.

Interested to hear your thoughts.


r/Playwright • • Sep 22 '26

Making Playwright more practical and efficient for AI agents

35 Upvotes

Playwright gives AI agents a browser, but agent-driven browsing can still be slow and surprisingly token-heavy.

I’ve been working on Hyper-Browsing, an open-source agent skill built on Playwright + your local Chrome session.

The basic idea is simple:

On a new website, the agent uses a set of built-in tools to inspect forms, handle dynamic pages, scroll virtual lists, detect state changes, and extract only the parts of the DOM it actually needs.

But the more interesting part is what happens afterward.

When a useful workflow succeeds, Hyper-Browsing can save what it learned as site knowledge + reusable scripts. The next time the agent visits that site, it can skip most of the DOM exploration and directly reuse the known path.

So the loop becomes:

discover → use → learn → reuse

A few other things I cared about:

  • compact DOM inspection to reduce agent context/tokens

  • reuse of your existing Chrome login/session

  • local browser control instead of a hosted browser

  • fallback to discovery if a saved workflow breaks after a site update

For repeated tasks, it feels roughly ~10x faster to me than having an agent drive plain Playwright from scratch each time. That’s a subjective observation, not a benchmark.

There are a couple of demos in the README showing both a first-time visit and a previously learned site:

https://github.com/miter37/hyper-browsing

If anyone here works with browser agents, I’d especially like feedback on websites or workflows where this approach breaks down or still feels inefficient.


r/Playwright • • Jan 02 '26

2 years into playwright and i'm still spending 70% of my time on test maintenance

35 Upvotes

thought switching from selenium to playwright would solve my maintenance nightmare. it's better in some ways, definitely less flaky and better dev tools. but i'm still spending most of my time updating tests instead of actually testing.

every feature release means 15 to 20 tests need updates. every ui redesign is a disaster. even with good locator strategies and test ids everywhere, tests still break constantly. dom structure changes, someone refactors a component, animations get added, whatever.

tried being really smart about it. used the best practices, got devs to add data-testid attributes, used text based selectors when possible. still doesn't matter. maintenance is endless.

honestly starting to question my career choice here. got into qa because i wanted to improve product quality and find interesting bugs. instead i'm just a test maintenance engineer updating selectors all day.

is this just reality for ui automation or am i missing something? there has to be a better way to write tests that survive normal development changes without constant babysitting.


r/Playwright • • Apr 21 '26

Playwright timeline reporter

Post image
34 Upvotes

A few months ago I had an idea to build a custom Playwright reporter. I wanted to visualize my test runs on a timeline. The goal was simple: understand how tests are spread across workers and where time is being lost.

At first I thought I would vibe-code it quickly. But it took much longer than expected. Playwright reporter APIs made some parts tricky, especially measuring the actual test body and placing tests correctly on worker lanes.

At some point my wife started calling it "sausages", because she kept seeing these long colored bars on my screen all the time :)

But it was worth it. After the release, I ran the reporter on a real project and got useful insights (see the screenshot).

We run our e2e tests on CI with 4 shards. One worker was running a single large test file (blue bars) that was twice as long as the others. That explained the overall slowdown. The fix was simple: split the file or enable fully parallel mode.

Since then, I've fixed a few issues and made the reporter stable enough to share:

Repo: https://github.com/vitalets/playwright-timeline-reporter
Live demo: https://vitalets.github.io/playwright-timeline-reporter/demos/index.html

I'd appreciate your feedback ❤️