Lorsque j'essaie d'exécuter mon projet Nightwatch avec npm run project_one
, j'obtiens cette réponse.Impossible de lire le dossier source essayant d'effectuer une action
There was an error while starting the test runner:
Error: Cannot read source folder: /Users/BenyJo/examples/tests
at /Users/BenyJo/node_modules/nightwatch/lib/runner/run.js:203:21
at /Users/BenyJo/node_modules/nightwatch/lib/runner/walk.js:97:18
at FSReqWrap.oncomplete (fs.js:153:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] project_one: `nightwatch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] project_one script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Chaque fois que je l'utilise toute commande Nightwatch en utilisant NPM, je reçois la même erreur, ma config Nightwatch est la suivante:
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"selenium" : {
"start_process" : true,
"server_path" : "./bin/selenium_v360.jar",
"log_path" : "",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "./bin/chromedriver"
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
J'ai remarqué que dans cette erreur, il n'y a pas de fichier appelé, il devrait y avoir un dossier nightwatch là-dedans./Users/BenyJo/examples/tests
[Ne pas publier d'images de code ou d'erreurs!] (Https://meta.stackoverflow.com/q/303812/995714) – Rob