u/dhanvith2016

Playwright hangs after test completion

Hey! I'm running into a strange issue and could use some help.

I've built a custom automation framework on Playwright for testing a product at my company. Everything was working fine until Friday afternoon IST, when things started breaking in an unexpected way. No new code had been pushed since Thursday morning, and we were able to successfully run the scheduled Friday morning run too — so nothing in the codebase should have affected execution.

Here's what happens: the test runs to completion, all steps execute correctly, all log statements print as expected, and the browser closes normally — but then VS Code just keeps spinning as if the test is still running. It never marks the test as passed, and eventually it fails due to the global timeout I have configured. I've tried running tests via both the Playwright VS Code extension and the CLI, and the result is the same either way.

The weird part is that the test does seem to finish execution — it just never gets reported as done.

Has anyone seen this before, or have any idea what might be causing it?

https://preview.redd.it/0s1m0f9yji0h1.png?width=1876&format=png&auto=webp&s=afb2208fdd0e10d6590df0912e469bfdf82873ff

reddit.com
u/dhanvith2016 — 2 days ago