Answer the question
In order to leave comments, you need to log in
How to enable emulation of a mobile device using nightwatchjs for the firefox browser?
How to enable emulation of a mobile device using nightwatchjs for the firefox browser?
The nightwatch.json file looks like this:
{
"webdriver": {
"start_process" : true,
"server_path": "./node_modules/.bin/geckodriver",
"cli_args": [
"--log", "debug"
],
"port": 4444
},
"test_settings" : {
"default" : {
"desiredCapabilities": {
"browserName" : "firefox",
"acceptInsecureCerts": true,
"nativeEvents": true,
"javascriptEnabled": true,
"acceptSslCerts": true,
"firefoxOptions": {
"mobileEmulation": {
"deviceMetrics": {
"width": 360,
"height": 640,
"pixelRatio": 3
},
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Mobile Safari/537.36"
}
}
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question