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

Protractor incorrectly assumes I have both capabilities & multi-capabilities #4520

Closed
benjaminapetersen opened this issue Oct 3, 2017 · 6 comments

Comments

@benjaminapetersen
Copy link

My protractor.config.js file is quite minimal:

'use strict';

exports.config = {
  suites: {
    //'create-project': 'integration/features/user_creates_project.spec.js', // This suite of tests should only require a running master api, it should not require a node
    'add-template-to-project': 'integration/features/user_adds_template_to_project.spec.js',
    'add-imagestream-to-project': 'integration/features/user_adds_imagestream_to_project.spec.js',
    // TODO: 'create-from-url': 'integration/features/user_creates_from_url.spec.js',
    // simple test to ensure we can get past OAuth (non-angular, sometimes flakes)
    'login': 'integration/features/user_logs_in.spec.js',
    // e2e: 'integration/e2e.js' 
  },
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true
  },
  multiCapabilities: [
    // {'browserName': 'firefox'},
    {'browserName': 'chrome'}
    //{'browserName': 'phantomjs'}
  ]
};

Output:

Running "protractor:default" (protractor) task
[14:48:41] W/launcher - You have specified both capabilities and multiCapabilities. This will result in capabilities being ignored
[14:48:41] I/launcher - Running 1 instances of WebDriver
[14:48:41] I/local - Starting selenium standalone server...

I don't have capabilities in my file nor are they defined in my Gruntfile.

Bug report

  • Node Version: v6.10.2
  • Protractor Version: 5.1.1
  • Angular Version: 1.5.11
  • Browser(s): Chrome
  • Operating System and Version OSX El Capitan v10.11.6
  • Your protractor configuration file (see above)
  • A relevant example test

Thanks!

@benjaminapetersen
Copy link
Author

Fwiw, in my case capabilities is what is being set in my Gruntfile when I pass args:

// protractor task
default: {
  options: {
    configFile: "test/protractor.conf.js",
    args: {
      baseUrl: grunt.option('baseUrl') || ("https://localhost:9000/" + contextRoot + "/"),
      browser: grunt.option('browser') ?
                grunt.option('browser') :
                isMac ?
                  'chrome' :
                  'firefox'
    }
  }
},

It is not clear that args maps to capabilities.

@wswebcreation
Copy link
Contributor

Hi @benjaminapetersen

When I look at your example test and also the version of Protractor in that project I see version 1.7.0. That's different from what you mention.

When I run the example And I use OR 'capabilities' OR multiCapabilities I get this output

npm run test.example   

> protractor@5.1.2 test.example /Users/wswebcreation/contributions/protractor
> node ./bin/protractor example/conf.js

[06:15:55] I/launcher - Running 1 instances of WebDriver
[06:15:55] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
Started
...


3 specs, 0 failures
Finished in 8.641 seconds

[06:16:05] I/launcher - 0 instance(s) of WebDriver still running
[06:16:05] I/launcher - chrome #01 passed

I think your issue has to do with the way you have set up the project with Grunt and you should look into that. Can you verify this also with the example project and if it works it's most likely an issue in the grunt-protractor-runner and you should check the plugin there / file an issue there. When you verified it works in the example setup we can close this issue.

@benjaminapetersen
Copy link
Author

benjaminapetersen commented Oct 4, 2017

Yup! I'm working on a branch to bring the dependencies up to date. Our current 1.7 is way out of date (my branch). Trying to get us up to 5, but jumping this many major versions has been a bit of a hassle.

@wswebcreation
Copy link
Contributor

Hi @benjaminapetersen

Can you please verify the below

I think your issue has to do with the way you have set up the project with Grunt and you should look into that. Can you verify this also with the example project and if it works it's most likely an issue in the grunt-protractor-runner and you should check the plugin there / file an issue there. When you verified it works in the example setup we can close this issue.

@benjaminapetersen
Copy link
Author

Agree with your assessment! opened issue with grunt-protractor-runner as this isn't a problem with protractor.

Thanks!

@wswebcreation
Copy link
Contributor

tnx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants