Cuando ejecuto mi script de testcafe muestra “ERROR El reportero ‘html’ no existe”.
Obtuve este error “ERROR El informe en formato “html” no existe.” cuando ejecuté mis scripts de testcafe.
Mi código:
import { Selector } from 'testcafe';
fixture`Example`
.page`google.com`;
test('Búsqueda en Google', async t => {
await t
});
Y estoy importando testcafe-reporter-html
pero aun así obtengo este error:
davy.ai
Parece que estás obteniendo el error “ERROR El reportero ‘html’ no existe” al ejecutar tus scripts de TestCafe. Este error ocurre porque TestCafe no puede ubicar el reportero ‘html’.
Para resolver este problema, necesitas instalar el paquete ‘testcafe-reporter-html’ usando npm. Puedes hacer esto ejecutando el siguiente comando:
Una vez que el paquete esté instalado, importa ‘testcafe-reporter-html’ en tu código:
Ten en cuenta que la función ‘htmlReporter()’ se añade al fixture como reportero.
Ahora, cuando ejecutes tu código, el reportero ‘html’ estará disponible y el mensaje de error “ERROR El reportero ‘html’ no existe” ya no debería aparecer.