Webdriverio: wdio.conf.ejs 未创建

创建于 2017-07-29  ·  4评论  ·  资料来源: webdriverio/webdriverio

问题

我遇到了与#1568完全相同的问题,该问题当时已关闭,但aztack再次报告。

安装后尝试配置Webdriver IO时,刚刚进入问题界面后出现错误:

=========================
WDIO Configuration Helper
=========================

? Where do you want to execute your tests? On my local machine
? Which framework do you want to use? mocha
? Shall I install the framework adapter for you? Yes
? Where are your test specs located? ./test/*.js
? Which reporter do you want to use?  spec - https://github.com/webdriverio/wdio-spec-reporter
? Shall I install the reporter library for you? Yes
? Do you want to add a service to your test setup?  selenium-standalone - https://github.com/webdriverio/wdio-selenium-standalone
-service
? Shall I install the services for you? Yes
? Level of logging verbosity command
? In which directory should screenshots gets saved if a command fails? ./errorShots/
? What is the base url? http://localhost

Installing wdio packages:

Packages installed successfully, creating configuration file...
fs.js:651
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/sarahdayan/Projets/communitytalk.com/node_modules/webdriverio/build/lib/helpers/wdio.conf.ejs'
    at Object.fs.openSync (fs.js:651:18)
    at Object.fs.readFileSync (fs.js:553:33)
    at renderConfigurationFile (/Users/sarahdayan/Projets/communitytalk.com/node_modules/webdriverio/build/lib/cli.js:292:28)
    at /Users/sarahdayan/Projets/communitytalk.com/node_modules/webdriverio/build/lib/cli.js:282:17
    at /Users/sarahdayan/Projets/communitytalk.com/node_modules/npm-install-package/index.js:31:5
    at ChildProcess.exithandler (child_process.js:262:7)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:897:16)
    at Socket.stream.socket.on (internal/child_process.js:340:11)
npm ERR! Test failed.  See above for more details.

环境

细节

我通过拒绝框架安装并跳过报告者的选择并向我的测试设置添加服务来设法解决问题:

? Shall I install the framework adapter for you? No
? Which reporter do you want to use?
? Do you want to add a service to your test setup?

然后我安装了它们并手动编辑了wdio.conf.js但这并不理想。

提前致谢!

最有用的评论

我遇到了同样的问题:节点 8.2.1+yarn 不工作 v0.27.5,节点 8.2.1 + npm 5.3.0 工作,节点 7.10.1 + yarn 工作。 问题可能出在哪里?

=========================
WDIO Configuration Helper
=========================

? Where do you want to execute your tests? On my local machine
? Which framework do you want to use? cucumber
? Shall I install the framework adapter for you? Yes
? Where are your feature files located? ./features/**/*.feature
? Where are your step definitions located? ./features/step-definitions
? Which reporter do you want to use?  spec - https://github.com/webdriverio/wdio-spec-reporter
? Shall I install the reporter library for you? Yes
? Do you want to add a service to your test setup?  selenium-standalone - https://github.com/webdriverio/wdio-selenium-standalone-service,  phantomjs - https://github.com/cognitom/wdio-phantomjs-serv
ice
? Shall I install the services for you? Yes
? Level of logging verbosity silent
? In which directory should screenshots gets saved if a command fails? ./errorShots/
? What is the base url? http://localhost

错误是一样的

所有4条评论

您可以尝试使用 Node v7.x 吗?

@christian-bromann 刚刚尝试了几个版本的 Node(v6.11.1、v7.0.0、v8.1.3、v8.2.1),奇怪的是,都通过了😶 当我第一次尝试时,我的本地 Node 副本可能有问题时间。

我猜任何有同样问题的人只需要重新安装或升级 Node 就可以了。

我遇到了同样的问题 - 使用节点 v8.1.2

我遇到了同样的问题:节点 8.2.1+yarn 不工作 v0.27.5,节点 8.2.1 + npm 5.3.0 工作,节点 7.10.1 + yarn 工作。 问题可能出在哪里?

=========================
WDIO Configuration Helper
=========================

? Where do you want to execute your tests? On my local machine
? Which framework do you want to use? cucumber
? Shall I install the framework adapter for you? Yes
? Where are your feature files located? ./features/**/*.feature
? Where are your step definitions located? ./features/step-definitions
? Which reporter do you want to use?  spec - https://github.com/webdriverio/wdio-spec-reporter
? Shall I install the reporter library for you? Yes
? Do you want to add a service to your test setup?  selenium-standalone - https://github.com/webdriverio/wdio-selenium-standalone-service,  phantomjs - https://github.com/cognitom/wdio-phantomjs-serv
ice
? Shall I install the services for you? Yes
? Level of logging verbosity silent
? In which directory should screenshots gets saved if a command fails? ./errorShots/
? What is the base url? http://localhost

错误是一样的

此页面是否有帮助?
0 / 5 - 0 等级