刚刚开始使用npm和Protractor但无法解决此问题。我安装了量角器v3.3.0,npm 3.9.0。 Webdriver运行良好
λ protractor conf.js
[14:00:04] E/configParser - error code: 105
[14:00:04] E/configParser - description: failed loading configuration file conf.js
> C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:130
> throw new exitCodes_1.ConfigError(logger, 'failed loading configuration file ' + filename);
> ^ Error
> at ConfigError.ProtractorError (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:10:22)
> at new ConfigError (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:26:16)
> at ConfigParser.addFileConfig (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:130:19)
> at Object.initFn [as init] (C:\Users\jj07251\AppData\Roaming\npm\node_modules\protractor\built\launcher.js:94:22)
> at Object.<anonymous> (C:\Users\jj07251\AppData\Roaming\npm\node_modules\protractor\built\cli.js:130:10)
> at Module._compile (module.js:409:26)
> at Object.Module._extensions..js (module.js:416:10)
> at Module.load (module.js:343:32)
> at Function.Module._load (module.js:300:12)
> at Module.require (module.js:353:17)
答案 0 :(得分:0)
给出确切的路径,即"e2e-tests/protractor.conf.js"
(就像我的情况一样)。
如果仍然存在错误,请将这些行添加到protractor.conf.js
文件 -
chromeOnly: true,
directConnect: true
希望这应该有效!
(PS-当我发出命令“protractor conf.js
”时,它给了我同样的错误)
答案 1 :(得分:0)
进入conf.js所在的目录并从那里运行量角器。