0

这是我的量角器配置

exports.config = {
  rootElement: '[ng-app="myapp"]',
  framework: 'jasmine',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['./assets/e2e/**/*protractor.js'],
  SELENIUM_PROMISE_MANAGER: false,
  baseUrl: 'https://localhost/',
  allScriptsTimeout: 20000,
  jasmineNodeOpts: {
    defaultTimeoutInterval: 100000,
  },
  capabilities: {
    browserName: 'firefox',
    marionette: true,
    acceptInsecureCerts: true,
    'moz:firefoxOptions': {
      args: ['--headless'],
    },
  },
}

我的输出日志被这样的调试消息挤满了

04:25:15 1544779515528  Marionette  DEBUG   [2147483649] Received DOM event beforeunload for https://localhost/login
04:25:18 1544779518273  Marionette  DEBUG   [2147483649] Received DOM event pagehide for https://localhost/login
04:25:30 [32m.[0m1544779531073    Marionette  DEBUG   [2147483649] Canceled page load listener because no navigation has been detected
04:25:31 [32m.[0m1544779532320    Marionette  DEBUG   [2147483649] Canceled page load listener because no navigation has been detected

请问如何摆脱那些 DEBUG 消息?

4

1 回答 1

0

尝试添加日志属性:

capabilities: {
    browserName: 'firefox',
    marionette: true,
    acceptInsecureCerts: true,
    'moz:firefoxOptions': {
      args: ['--headless'],
      log: {
        level: 'info'
      }
    },
  },
于 2018-12-15T07:52:44.647 回答