我正在使用nightwatchjs来运行我的测试套件,我想删除终端显示的警告信息。
目前,当我的脚本运行时,我收到了大量的警告信息(当然是真实的),这使得结果的阅读变得越来越困难。
举个例子,在我的脚本运行时,我收到了大量的(公认的)警告信息,这使得结果的阅读越来越困难。
是的,他们是有效的消息,但它不是经常可能让我唯一地挑选出每一个单独的元素,我对他们的输出不感兴趣。
所以,我想知道如何才能阻止它们在我的终端中被报告。
以下是我目前在我的系统中尝试过的方法 nightwatch.conf.js 配置文件。
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled : true,
acceptSslCerts: true,
acceptInscureCerts: true,
chromeOptions : {
args: [
'--ignore-certificate-errors',
'--allow-running-insecure-content',
'--disable-web-security',
'--disable-infobars',
'--disable-popup-blocking',
'--disable-notifications',
'--log-level=3'],
prefs: {
'profile.managed_default_content_settings.popups' : 1,
'profile.managed_default_content_settings.notifications' : 1
},
},
},
},
but it's still displaying the warnings.
Any help on this would be really appreciated.
Many thanks.