Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Type error on running command protractor-perf config.js #27

Open
anushasridhar15 opened this issue Mar 26, 2016 · 3 comments
Open

Comments

@anushasridhar15
Copy link

Getting below error on using protractor-perf although the browser has been specified in the config file

if (typeof browserConfig[passedBrowser.browserName] !== 'undefined') {
^TypeError: Cannot read property 'browserName' of undefined
at C:\Users\anusha\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\lib\options.js:84:42

NOTE- the code runs perfectly fine with protractor. it also runs when i specify the browser in command line like this ---> protractor-perf config.js --browser=chrome

config file code snippet :--

exports.config={multiCapabilities: [{

browserName:'chrome'

}]
};

@axemclion
Copy link
Owner

@anushasridhar15 This should be fixed with the latest version for browser-perf. Do you still see this error ?

@aluzardo
Copy link

aluzardo commented Oct 24, 2016

@axemclion I am getting the same error.

conf.js

    multiCapabilities: [
        {
            browserName: 'firefox'
        },
        {
            browserName: 'chrome'
        }
    ],

Error log:

> protractor-cucumber-tests@1.0.0 test-desktop-local /Users/adolfocabrera/xxx/QA-testing/Selenium/xxx
> protractor-perf conf.js --seleniumAddress 'http://localhost:4444/wd/hub' --params.testUser.username=autobot0

/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/options.js:84
                        if (typeof browserConfig[passedBrowser.browserName] !== 'undefined') {
                                                              ^

TypeError: Cannot read property 'browserName' of undefined
    at /Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/options.js:84:42
    at Array.forEach (native)
    at opts.accesskey (/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/options.js:79:18)
    at /Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/options.js:197:10
    at Array.forEach (native)
    at Object.module.exports.scrub (/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/options.js:196:14)
    at new Runner (/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/node_modules/browser-perf/lib/runner.js:12:22)
    at Function.module.exports.getConfig (/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/lib/index.js:89:15)
    at Object.<anonymous> (/Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/protractor-perf/lib/cli.js:149:15)
    at Module._compile (module.js:413:34)

@axemclion
Copy link
Owner

@jahnavi310 Said that this issue was solved in #35

@axemclion axemclion reopened this Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants