Check there were no errors in the browser console with Protractor

后端 未结 4 1100
南旧
南旧 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:08

    How @velochy stated there is now an own package for the module: https://www.npmjs.com/package/protractor-console-plugin

    You can use it in your protractor.conf:

      plugins: [{
        package: 'protractor-console-plugin',
        failOnWarning: {Boolean}                (Default - false),
        failOnError: {Boolean}                  (Default - true),
        logWarnings: {Boolean}                  (Default - true),
        exclude: {Array of strings and regex}   (Default - [])
      }]
    

提交回复
热议问题