index.js
function onPrepare() {
    if (IS_JSON_FORMAT) {
        return browser.getCapabilities()
            .then((capabilities) => {
                PID_INSTANCE_DATA.metadata.browser.name = PID_INSTANCE_DATA.metadata.browser.name === ''
                    ? capabilities.get('browserName').toLowerCase()
                    : PID_INSTANCE_DATA.metadata.browser.name;
                PID_INSTANCE_DATA.metadata.browser.version = (capabilities.get('version') || capabilities.get('browserVersion'))
                    || PID_INSTANCE_DATA.metadata.browser.version;
            });
    }
}
function onPrepare() {
    if (IS_JSON_FORMAT) {
        return browser.getCapabilities()
            .then((capabilities) => {
                PID_INSTANCE_DATA.metadata.browser.name = PID_INSTANCE_DATA.metadata.browser.name === ''
                    ? capabilities.get('browserName').toLowerCase()
                    : PID_INSTANCE_DATA.metadata.browser.name;
                PID_INSTANCE_DATA.metadata.browser.version = (capabilities.get('version') || capabilities.get('browserVersion'))
                    || PID_INSTANCE_DATA.metadata.browser.version;
            });
    }
}
function onPrepare ( ) { if ( IS_JSON_FORMAT ) { return browser . getCapabilities ( ) . then ( ( capabilities ) => { PID_INSTANCE_DATA . metadata . browser . name = PID_INSTANCE_DATA . metadata . browser . name === '' ? capabilities . get ( 'browserName' ) . toLowerCase ( ) : PID_INSTANCE_DATA . metadata . browser . name ; PID_INSTANCE_DATA . metadata . browser . version = ( capabilities . get ( 'version' ) || capabilities . get ( 'browserVersion' ) ) || PID_INSTANCE_DATA . metadata . browser . version ; } ) ; } }
Enrich the instance data

@see docs/plugins.md
@returns {Promise} A promise which resolves in a enriched instance data object
@public
Enrich the instance data