2

Currently, I am using different Firefox profiles setup with multi-capabilities with some help from this answer. Each of my Firefox profiles is set up with a client certificate which differentiates it from others.

Is there a way create a test where the different profiles can interact with each other?

I know that you can spawn new browsers in sequence in a test using browser.forkNewDriverInstance. I want to combine this with the browsers I set up in multi-capabilities to run tests in sequence using custom Firefox profiles and not in parallel.

So my protractor.conf.js would look like this:

...
getMultiCapabilities: function () {
    return q.all([
        newFirefoxProfile('test/firefox-profile-1'),
        newFirefoxProfile('test/firefox-profile-2')
    ]);
},
...

And in a test.spec.js file:

describe('my account', function () {

    var browser2 = browser.forkNewDriverInstance();
    //rather than fork new instance, I want a different capability instance

    it('should have grant new authority', function () {
        //browser 1 gives new authority to browser 2
        //browser2.get('#/my-account/details');
        //browser2 verify new authority
    });
}
Community
  • 1
  • 1
Andrew H
  • 453
  • 1
  • 3
  • 8

1 Answers1

0

You need to list your browsers in multiCapabilities

Just look at the accepted answer here.

Hope this helps. :)

Community
  • 1
  • 1
Manuli
  • 1,203
  • 4
  • 20
  • 43