WebdriverIO - how do you add a custom chrome profile on wdio.confis.js?

Viewed 417

im trying to add a custom profile which i placed in a specific dir, im able to do this is both java and Javascript(without webdriverIO) but sure how to migrate this:

var webdriver = require('selenium-webdriver');
var chrome = require("selenium-webdriver/chrome");
var options = new chrome.Options();
options.addArguments(['user-data-dir=C:/Mocha_JS/Profile 1']);
var driver = new webdriver.Builder().withCapabilities(options).build();
1 Answers
   //
    capabilities: [{
    
        // maxInstances can get overwritten per capability. So if you have an in-house Selenium
        // grid with only 5 firefox instances available you can make sure that not more than
        // 5 instances get started at a time.
        maxInstances: 5,
        //
        browserName: 'chrome',
        acceptInsecureCerts: true,
        "goog:chromeOptions": {
        args: ["--user-data-dir=C:/Users/Google/Chrome/User Data"]
        }
        // If outputDir is provided WebdriverIO can capture driver session logs
        // it is possible to configure which logTypes to include/exclude.
        // excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
        // excludeDriverLogs: ['bugreport', 'server'],
    }],

pass all chrome options as "goog:chromeOptions" ,

Related