-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run any Playwright test #13092
Comments
Turned out the problem is related to Git Bash. Tests run fine when executed in Windows CMD. I think it has to do with double global.ts |
I also had this issue. In my case the problem was I was executing |
I have the same error when i want to lunch saucelab test : saucectl run , someone have an idea about it? thanks |
Hi I too have the same error, when using Playwright version 1.22.2 with saucelabs .. any help would be appreciated, thanks in advance
|
I am having this problem also. Our configuration is in playwright.config.ts but Playwright is ignoring it.
The same code is working on the machine of the developer who originally wrote our playwright scripts. We are using The advice above didn't work but I found a workaround: the Playwright Test for VSCode (ms-playwright.playwright) extension is able to run and debug our tests. |
@qwertie In my case I had multiple packages of a monorepo with different versions of |
Yeah, I forgot to mention that only one version of @playwright/test is installed in my case. |
I'm also using git bash, and in my case I had CDed into a directory with incorrect casing, e.g. |
I encountered this problem when I used lowercase paths to cd with powershell to the project directory. When I navigated from c:\ into the full directory path with the correct casing, the problem disappeared. |
This happened to me as well. I changed the casing of my folder names in Windows Explorer, but MS Code was still "using" the original casing in the terminal window, and it failed to run the tests. Navigating out and back into the folder in Code using the correct casing resolved the issue. |
@gokul-sol / @emnabn - Did you ever figure out the issue when wanting to run your Playwright tests in Saucelabs? |
@jpaxtonrs for me adding |
I avoided using tab to complete file path in terminal. I used npx playwright test ./tests/example.spec.js and it worked |
This was indeed the problem for me. Thanks a lot |
I got this issue when run the feature file XD it just suddenly appear, everything running well yesterday |
Thanks you for your coments they helped me to solve my issue :)
replacing this dir() step by a |
I had this issue when using yarn workspaces and having the e2e tests in a non root folder. Adding: |
same problem on windows. |
I had vitest in my package dev and dependencies and that helped to solve the problem for me |
I had the same problem with pnpm. It was resolved by using |
In case anyone else is searching: Same goes for yarn. It wasn't working for me with |
None of above worked but my case: pnpm workspace. only 1 playwright in the workspace. |
I'm not sure if this is related but it seems to be.
Instead this will work
It's cumbersome, but I need this to work and move on. I believe this to be a bug with how playwright exits. |
yarn remove playwright
yarn create playwright
yarn install playwright |
Just adding my 2c since I'm getting this as well. My tests won't run in powershell or bash suddenly, but will run in command prompt. |
Thanks a lot!! It turned out to be my issue too |
Playwright already registers it's own |
I had the same issue. My solution is : |
Hi when I am creating new spec.js file it is not running in the terminal but default files are executed on terminal using npx playwright test command |
Context:
Describe the bug
A fresh installation of Playwright and attempting to run example spec produces this error:
package.json
The text was updated successfully, but these errors were encountered: