How can I run automation tests with Mocha.js in incognito mode on LambdaTest cloud ?
Hello Rhian,
If you wish to run Mocha.js testing with automation tests in incognito mode on LambdaTest cloud, you can use the below code snippet:
In conf/single.conf.js
file, you need to update your capabilities. You can specify the incognito options in this file. The following is an example on how to set:
exports.capabilities = {
'build': 'Mocha-Selenium-Sample', //Build name
'name': 'Your Test Name', // Test name
'platform':'Windows 10', // OS name
'browserName': 'chrome', // Browser name
'version': 'latest', // Browser version
'visual': false, // To take step by step screenshot
'network':false, // To capture network Logs
'console':false, // To capture console logs.
'tunnel': false, // If you want to run the localhost than change it to true
"chromeOptions" : {
"args" : ["incognito"] // ChromeOption to start chrome in incognito mode
}
};
Here’s the GitHub repo for the same: https://github.com/rshmimondal/Mocha-js-incognito