Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

How to get deviceName value from Multicapabilities definition at run time  #4719

@kat0072

Description

@kat0072

Hi Team,

This might be repeated question for you guys but really I didn't answer yet.
Here is my multi-capabilities definition in protractor config file.
I want to access the deviceName parameter value. How can I do it?

exports.config = {
directConnect:true,
    multiCapabilities: [
        {
            browserName: 'chrome',
            'chromeOptions': {
                'mobileEmulation': {
                    'deviceName': 'iPad'
                }
            }
        }
],

Tried under onPrepare but not giving multi-capabilities values

browser.getCapabilities().then(function(c) {
            console.log(c.get('deviceName'));
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions