我使用nightwatch上运行Chrome和Firefox的测试。是否有指定nightwatch Firefox的可执行文件路径的方法吗?
一切就像在Chrome魅力。我成功地在我们的服务器上运行Firefox的测试,但是我的机器上有问题。
目前,由于Marionnette不是很稳定,我们正在测试我们的软件Firefox ESR这是支持没有任何驱动程序的硒。
在我的Linux机器,我安装了火狐(最新)和Firefox(扩展支持版本)。
- Firefox是在
/usr/bin/firefox
- 的Firefox ESR accssible是
/usr/bin/firefox-es
用量角器,我可以使用名为firefox_path
魔法属性触发该可执行文件。
但我还没有找到如何使nightwatch使用/usr/bin/firefox-esr
任何想法?
我的配置,如果你有兴趣:
const seleniumPath = /*computed value*/;
module.exports = {
"src_folders": ["test/e2e"],
"output_folder": "reports/e2e",
"detailed_output": false,
"selenium": {
"start_process": true,
"server_path": seleniumPath,
"log_path": "",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {},
},
"test_settings": {
"default": {
"launch_url": launchUrl,
"exclude": ["utils/**/*", "gulpfile.js", "nightwatch*.js"],
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"screenshots": {
"enabled": true,
"path": "reports/e2e/screenshots",
},
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true,
},
},
"test_runner": {
"type": "mocha",
"options": {
"ui": "bdd",
"reporter": "spec",
},
},
}
你可能有运气设定'selenium.start_process'到'TRUE',让nightwatch决定如何运行。 –