ปลั๊กอินไม้โปรแทรกเตอร์ - การเข้าถึง - AssertionError: เส้นทางต้องเป็นสตริง

ฉันกำลังพยายามใช้ปลั๊กอินสำหรับไม้โปรแทรกเตอร์ เช่น(การเข้าถึง คอนโซล ฯลฯ...) แต่เมื่อฉันพยายามรันการทดสอบ 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 มี "accessibility-developer-tools": "^2.6.0" เป็นการพึ่งพา Dev

โปรดแนะนำวิธีแก้ปัญหาในการแก้ไขปัญหานี้และดำเนินการตรวจสอบการเข้าถึงด้วย ควบคู่ไปกับการดำเนินการทดสอบ E2E

ขอบคุณล่วงหน้า.


person Rajesh Yarlagadda    schedule 15.04.2015    source แหล่งที่มา


คำตอบ (1)


เส้นทางควรชี้ไปที่ไฟล์ index.js ของปลั๊กอินที่เหมาะสม เช่น ในกรณีของฉันมันคือ:

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