【发布时间】:2016-06-03 14:22:23
【问题描述】:
我正在尝试在安装了 Centos OS 的 linux 机器上运行 nightwatch 自动 ui 测试。我在开始时遇到了问题。
这是我在 nightwatch.json 中的 test_settings 配置
"test_settings": {
"default": {
"launch_url": "",
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"screenshots": {
"enabled": true,
"on_failure": true,
"on_error": true,
"path": "./screenshots"
},
"detailed_option": true,
"end_session_on_fail": false,
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true,
"chromeOptions": {
"args": [
"use-fake-device-for-media-stream",
"use-fake-ui-for-media-stream"
]
}
}
},
我安装了 linux 64bit chrome 驱动程序。然后我安装了 selenium 独立服务器。但是当我想要使用 node nightwatch 进行夜间测试时,我得到了一个错误
“连接被拒绝!Selenium 没有启动..”
如何设置一个 linux 机器来运行 nightwatch 自动化 UI 测试?
当我将 start_process 设置为 false 并单独运行 selenium 服务器时,我收到以下错误:
14:23:41.158 WARN - Exception: unknown error: Chrome failed to start: exited abnormally
【问题讨论】:
标签: linux node.js selenium nightwatch.js