[英]Angular e2e tests protractor chrome flags not working headless
我正在尝试在我的量角器配置中设置 cookie-without-same-site-must-be-secure@2,它在不无头运行时完美运行。 但是当我启用无头运行时它不起作用并且我的测试因此失败。 有解决方法还是我在这里做错了什么?
提前致谢。
capabilities: {
'browserName': 'chrome',
'shardTestFiles': true,
'maxInstances': 4,
'chromeOptions': {
args: [
"lang=nl-NL",
"--disable-gpu",
"--window-size=1800,1080",
"--no-sandbox",
"--disable-infobars",
"--disable-dev-shm-usage",
"--headless"
],
prefs: {
intl: { accept_languages: "nl-NL" },
},
localState: {
'browser': {
'enabled_labs_experiments': ['cookies-without-same-site-must-be-secure@2']
}
}
}
}
作为替代方案,我发现将--disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies
到 args 数组即可工作。 这并不是真正解决标志不起作用的事实,而是针对这种特殊情况的解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.