Check there were no errors in the browser console with Protractor

后端 未结 4 1118
南旧
南旧 2021-02-14 10:38

I\'m using Protractor to test AngularJS

I want to check that at the end of the test no uncaught exceptions occurred and were printed to the browser console.

Is t

4条回答
  •  旧巷少年郎
    2021-02-14 11:10

    Protractor 2.0.0 has introduced a new console plugin specifically for the task.

    Add the following to the protractor configuration:

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

提交回复
热议问题