如何使用 Chrome 浏览器在无头模式下运行 botium-cli + botium-webdriver-connector?
该网页不适用于 phantomjs 浏览器
编辑:弗洛里安回答有效,我在 ubuntu 上运行 jenkins,还需要添加 --no-sanbox 和 --disable-dev-shm-usage 选项
我的最终配置
"WEBDRIVERIO_OPTIONS": {
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions": {
"args": [ "--headless", "--no-sandbox", "--disable--dev-shm-usage" ]
}
}
}
有一个在无头模式下使用 Chrome 的 Botium 示例:https : //github.com/codeforequity-at/botium-connector-webdriverio/blob/master/samples/botbuilderwebchat/
在 botium.json 中,webdriver 选项应该设置如下:
"WEBDRIVERIO_OPTIONS": {
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions": {
"args": [ "--headless" ]
}
}
},
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句