量angular器插件 – 辅助function – AssertionError:path必须是一个string

我正在尝试使用可用于量angular器的插件。 例如(辅助function,控制台等)。 但是,当我尝试运行E2Etesting失败,出现以下错误信息。

**[launcher] Error: AssertionError: path must be a string at Module.require (module.js:362:3) at require (module.js:380:17) at new Plugins (/home/protractor-git/beta- e2e/node_modules/protractor/lib/plugins.js:39:29) at driverprovider_.setupEnv.then.then.then.then.frameworkPath (/home/protractor-git/beta-e2e/node_modules/protractor/lib/runner.js:257:15) at _fulfilled (/home/protractor-git/beta-e2e/node_modules/protractor/node_modules/q/q.js:797:54) at self.promiseDispatch.done (/home/protractor-git/beta-e2e/node_modules/protractor/node_modules/q/q.js:826:30)** 

Config.js中的插件configuration如下所示。

 plugins: [ { chromeA11YDevTools: { treatWarningsAsFailures: true }, path: 'node_modules/protractor.plugins/accessiblity' }, { path: 'node_modules/protractor/plugins/console', failOnWarning: false , failOnError: true } 

]

package.json,具有“accessibility-developer-tools”:“^ 2.6.0”作为Dev Dependencies。

如果有任何解决方法可以解决此问题并执行可访问性validation,那么您是否还需要提供build议,以及E2Etesting执行。

提前致谢。

path应该指向相应插件的index.js文件,例如我的情况是:

 { path: '../../../node_modules/protractor/plugins/console/index.js', failOnWarning: true, failOnError: true }, 
Interesting Posts