I’m trying to write a test automation script using appium, jasmine, and perfecto mobile. I’m using the project cloned from the following URL with my own configuration Appium Javascript Example
The problem is when I execute the npm test command I get the following error
node_modules is not recognized as an internal or external command
This is how the packages.json script looks like:
JavaScript
x
23
23
1
{
2
"name": "perfecto_appium_sample",
3
"version": "1.0.0",
4
"description": "The following sample shows how to Install an application and use WebDriverIO to automate and test it.<br/> It uses selendroid test application which can be downloaded from [here](https://github.com/PerfectoCode/AppsForSamples/tree/master/selendroid-test-app-0.17.0).",
5
"main": "perfectoSpec.js",
6
"scripts": {
7
"test": "node_modules/webdriverio/bin/wdio wdio.conf.js",
8
"start": "wdio wdio.conf.js"
9
},
10
"author": "",
11
"license": "ISC",
12
"devDependencies": {
13
"wdio": "^0.3.3",
14
"wdio-jasmine-framework": "^0.2.19",
15
"wdio-mocha-framework": "^0.5.12"
16
},
17
"dependencies": {
18
"wd": "^1.5.0",
19
"webdriverio": "^4.10.2"
20
},
21
"keywords": []
22
}
23
Advertisement
Answer
you need to provide relative path properly:
JavaScript
1
5
1
"scripts": {
2
"test": "node ./node_modules/webdriverio/bin/wdio wdio.conf.js",
3
"start": "wdio wdio.conf.js"
4
}
5