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.

Using Protractor to run tests against multiple user roles #1088

Closed
@jpetraws

Description

@jpetraws

I am trying to run the same test for different roles in the application.

The problem is since there is no logout/login page(SSO magic). I can't logout and login is a different user on the same browser.

I have been trying to get around this and look up a way to pull up a new browser instance or anything.

The only thing that got kind of close was if I tried to use multiCapabilities:

multiCapabilities: [{
    browserName: 'chrome',
    acceptSslCerts: true,
    trustAllSSLCertificates: true,
    specs: ['claimsoverview/login-claims-analyst.spec.js']
}, {
    browserName: 'chrome',
    acceptSslCerts: true,
    trustAllSSLCertificates: true,
    specs: ['claimsoverview/login-supervisior.spec.js']
}],

Each individual spec works, but when I run them together they do not and I get Unknown error unsupported protocol. And also Error: Error while waiting for Protractor to sync with the page: {}

Before each test I have to hit an Oracle SSO page which is non-angular then I can finally be re-routed to the url that is angular.

//Here is the beginning of one spec..
it('should load homePage from Oracle Sign in Page', function() {

   var dvr = browser.driver;

    //To get around the untrusted cert issue per browser
    dvr.get('https://url');
    UntrustedCertOverride(dvr);

    //Get SSO PageObject and run login()
    var oracleSsoPage = new OracleSsoPage(dvr);
    oracleSsoPage.login(browser.params.claimsAnalyst.userName, browser.params.claimsAnalyst.password);

    //Expect the title to be ConDOR
    expect(browser.getTitle()).toEqual("homePage");
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions