The solution is to create a Firefox profile for your Nightwatch test.
1) Create a new Firefox profile:
In the terminal, run the following command: firefox -p "
Then create a profile called " webdriver ".
2) Set up a new profile
Go to this configuration page with the URL: about: config
Find the name " intl.accept_languages" and update the value.
Exit Firefox for now.
3) Configure Nightwatch to use the new profile
Be careful! this is not the "desired method" parameter.
Solution 1: (test configuration)
{ "yourTest" : { "default" : { ... "webdriver.firefox.profile" : "webdriver", "launch_url": "http://localhost:3000", "desiredCapabilities" : { "browserName" : "firefox", "javascriptEnabled" : true, "acceptSslCerts" : true } } } }
Solution 2: (global configuration)
{ ... "selenium" : { "start_process" : false, "server_path" : "", "log_path" : "", "host" : "127.0.0.1", "port" : 4444, "cli_args" : { "webdriver.chrome.driver" : "", "webdriver.ie.driver" : "", "webdriver.firefox.profile" : "webdriver" } }, ... "yourTest": { "default": { "launch_url": "http://localhost:3000", "desiredCapabilities" : { "browserName" : "firefox", "javascriptEnabled" : true, "acceptSslCerts" : true } }, ... } ... }
check selenium settings: http://nightwatchjs.org/guide#selenium-settings
Nicolas pennec
source share