Reputation: 77
I am a beginner for webdriverIO. I have started with TestRunner with the help of web driver IO docs. I installed node and get expected a response for this command
./node_modules/.bin/wdio --help
I defined configuration using
./node_modules/.bin/wdio config
But when I am running
./node_modules/.bin/wdio wdio.conf.js
it is giving me following error
Error: Couldn't initialise launcher from service "chromedriver".
Error: Cannot find module 'chromedriver'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/userName/node_modules/wdio-chromedriver-service/build/launcher.js:9:21)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Launcher.getLauncher (/Users/userName/node_modules/webdriverio/build/lib/launcher.js:815:35)
at Launcher._callee$ (/Users/userName/node_modules/webdriverio/build/lib/launcher.js:234:49)
at tryCatch (/Users/userName/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/userName/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/Users/userName/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/Users/userName/node_modules/webdriverio/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/userName/node_modules/webdriverio/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
at new F (/Users/userName/node_modules/webdriverio/node_modules/core-js/library/modules/_export.js:36:28)
at Launcher.<anonymous> (/Users/userName/node_modules/webdriverio/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)
Upvotes: 2
Views: 5097
Reputation: 2269
I've had this issue before. It comes down to wdio-chromedriver-service
not installing chromedriver
as a dependency.
To fix this issue, simply run:
npm i chromedriver --save-dev
Upvotes: 9