Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playwright VSCode gives `No tests found` message

I've installed the Playwright vscode extension but when I go to the testing area I get a "No tests have been found in this workspace" message. But when I run $> playwright test on the CLI it works like a charm. The weird thing is, that some time ago it was perfectly working in VSCode.

enter image description here

When I click the reload icon I get

enter image description here

But then after a couple of seconds I get back where I started. When I click the blue button I go to the list of extension

enter image description here

I'm not very sure what I am suppose to install here. Also, it did work in the past already.

This is the extension I installed for Playwright:

enter image description here

Any suggestion what is going on here in my VSCode?

like image 603
Jeanluca Scaljeri Avatar asked Sep 02 '25 06:09

Jeanluca Scaljeri


2 Answers

I had the same issue today and these are the steps I used to make this work,

  • I first tried the Command Pallete reload window and that didn't fix it.
  • I completely closed vscode, opened my terminal and traversed into the folder and opened vscode with code . and it fixed it

I'm using nvm with node v14.19.0 and vscode v1.77.0

like image 106
gleek Avatar answered Sep 04 '25 22:09

gleek


Please update your Playwright version (Version 1.28.1 at the time of this post) to the latest, (Steps below),

First Check your current version

 npx @playwright/test --version

Update to the latest version

npm install @playwright/test@latest

Install Browsers

npx playwright install

Check the updated version

npx @playwright/test --version

And also install/update the latest version of the Playwright Test for VSCode (v1.0.1 at the time of this post) and reload the IDE. This can be done by simply as follows,

  1. Go to Extensions
  2. Search for "Playwright Test for VSCode"
  3. Update or install the given latest version

It Worked for me.

like image 20
Anjana Deegoda Avatar answered Sep 04 '25 21:09

Anjana Deegoda