Estoy tratando de ejecutar la prueba de playwright desde la ubicación a continuación, pero muestra el mensaje npm install -D @playwright/test y no puedo ejecutar la prueba. Ya instalé playwright como dependencia de desarrollo. ¿Podría alguien aconsejar cuál es el problema aquí?
He intentado a continuación se ejecuta:
1)
Test User@TestUser MINGW64 /c/Test $ npx playwright test --headed Please install @playwright/test package to use Playwright Test. npm install -D @playwright/testTest User@TestUser MINGW64 /c/Test $ npx playwright test Instale el paquete @playwright/test para usar Playwright Test. npm install -D @dramaturgo/prueba
// prueba/prueba1.spec.js
const { test, expect } = require('@playwright/test'); test('basic test', async ({ page }) => { await page.goto('https://playwright.dev/'); const title = page.locator('.navbar__inner .navbar__title'); await expect(title).toHaveText('Playwright'); });//paquete.json
{ "name": "play", "version": "1.0.0", "description": "Playwright test", "main": "index.js", "directories": { "test": "test" }, "dependencies": {}, "devDependencies": { "@playwright/test": "^1.16.1" }, "scripts": { "test": "npx playwright test" }, "author": "Test", "license": "ISC" }