【发布时间】:2020-09-08 10:56:12
【问题描述】:
我正在尝试在我的量角器配置中设置 cookies-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']
}
}
}
}
【问题讨论】:
-
我也有同样的问题。幸运的是,一个 PR 被合并到 selenium-nodejs 中,它允许我们为 addCookie 设置相同的站点(参见:github.com/SeleniumHQ/selenium/pull/8652)
标签: angular protractor e2e-testing