Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 量角器插件-可访问性-AssertionError:path必须是字符串_Node.js_Accessibility_Protractor_Angularjs E2e_E2e Testing - Fatal编程技术网

Node.js 量角器插件-可访问性-AssertionError:path必须是字符串

Node.js 量角器插件-可访问性-AssertionError:path必须是字符串,node.js,accessibility,protractor,angularjs-e2e,e2e-testing,Node.js,Accessibility,Protractor,Angularjs E2e,E2e Testing,我正在尝试使用可用于量角器的插件。例如(可访问性、控制台等)。但是,当我尝试运行E2E测试时,出现以下错误消息,测试失败 **[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/nod

我正在尝试使用可用于量角器的插件。例如(可访问性、控制台等)。但是,当我尝试运行E2E测试时,出现以下错误消息,测试失败

**[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中的插件配置如下所示

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

{
 path: 'node_modules/protractor/plugins/console',
 failOnWarning: false               ,
 failOnError: true                  

}
]

package.json具有“可访问性开发人员工具”:“^2.6.0”作为开发人员依赖项

请告知是否有解决此问题的解决方法,以及执行可访问性验证以及E2E测试执行


提前感谢。

路径应指向相应插件的
index.js
文件,例如,在我的情况下,它是:

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