How to set browser specific options in Mocha.js on LambdaTest cloud?

How To set browser specific options in Mocha.js on LambdaTest cloud?

Hey NoahSmith,

If you want to set browser-specific options on Mocha-js -testing for an automation test on Lambdatest, you can use the following steps. You can refer to the sample test repo :

In conf/single.conf.js file, you need to update your capabilities. You can specify the various browser specific options in this file. The following is an example on how to set Chrome specific options using chromeOptions:

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-browser-options