I've been using nightwatch to run tests on both Chrome and Firefox with great success.
While everything runs smoothly on Chrome, I'm facing an issue when trying to run tests on Firefox on my personal machine.
Currently, due to Marionette's instability, we are testing our software using Firefox ESR, which is supported by selenium without the need for a driver.
On my Linux machine, I have installed both the latest version of Firefox and Firefox ESR.
- The regular Firefox can be found in
/usr/bin/firefox
- While Firefox ESR is located at
/usr/bin/firefox-esr
In Protractor, I can specify which executable to use with the firefox_path
property.
However, I haven't yet figured out how to configure nightwatch to use the /usr/bin/firefox-esr
path.
Any suggestions?
If you're curious, here's my configuration:
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",
},
},
}