Chrome 版本 89 并在以下设置下进行设置,但仍然没有关闭阻止其余测试用例的权限弹出窗口。任何想法或解决方法?
capabilities: [{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instances available you can make sure that not more than
// 5 instances get started at a time.
maxInstances: 1,
//
browserName: 'chrome',
'goog:chromeOptions': {
// to run chrome headless the following flags are required
// (see https://developers.google.com/web/updates/2017/04/headless-chrome)
// args: ['--headless', '--disable-gpu'],
prefs: {
'profile.managed_default_content_settings.popups' : 1,
'profile.managed_default_content_settings.notifications' : 1,
},
args: ['--auto-open-devtools-for-tabs', 'disable-infobars', 'disable-popup-blocking', 'disable-notifications']
},
// If outputDir is provided WebdriverIO can capture driver session logs
// it is possible to configure which logTypes to include/exclude.
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
// excludeDriverLogs: ['bugreport', 'server'],
}],