logoalt Hacker News

dmdyesterday at 8:25 PM3 repliesview on HN

Thanks. I would love to understand what people are doing with Playwright that doesn't involve those things. I really can't recall ever using it where that wasn't what I was doing. I use it letting Claude fix things. You can't fix what you can't see! What else are people using it for? Obviously there must be a (very popular!) use case for "just clicking", but I can't seem to imagine it.


Replies

Robdel12yesterday at 8:56 PM

To me doing network interception in browser driven tests is a smell like that. Unless you’re running vs a full mocked server (like MSW).

I’m a big fan of testing exactly like a user. Users don’t use network intercepts, timeouts, etc. All of my most reliable tests assert on DOM state. If the user doesn’t see it, don’t assert on it.

show 2 replies
VoidWhispereryesterday at 8:55 PM

In my experience, we've used playwright significantly for unit/integration tests combining it with react-testing-library to verify individual components and also whole (mocked, we used something else that I can't seem to remember for E2E tests) flows within that React application

hugsyesterday at 8:51 PM

don't underestimate the "just clicking" use case!

show 1 reply