BugBee
BugBee

Reputation: 147

How to execute tests in incognito mode using webdriverIO

How to execute my testcases in incognito mode using webdriverIO. I didn't find any help regarding this on help document. for Ex: below code from Protractor to run in incognito mode. I tired in wbioconf.js file but not able to launch.

capabilities: {
'browserName': 'chrome',
'platform': 'ANY',
'version': 'ANY',
'chromeOptions': {
args: ['--incognito'],
}

Upvotes: 1

Views: 2981

Answers (1)

pavelsaman
pavelsaman

Reputation: 8322

I think very much the same will work in WDIO:

In the testrunner config, pass the option to Chrome:

exports.config = {
    capabilities: [{
        browserName: 'chrome',
        'goog:chromeOptions': {
            args: ['--incognito'],
        }
    }]
}

Upvotes: 1

Related Questions