Protractor: Automating E2E Testing — Select Certif

2019-03-16 07:10发布

问题:

I'm writing E2E - Test for our Business Application's. Because it's an enterprise environment, I have to choose Client Certificates to access the different Webapps (I have installed different certificates for different test users).

As long as I start the tests manually, it's no problem to first select the appropriate cert. But when to trigger them in the automated build, that does not work. I wasn't able to select the certificate using Protractor itself.

At the moment, I've a script which first deletes all cert's, then install's a specific one and start's the test's using IE. With Chrome there is still a pop-up for selecting the cert. So I can run the test's in automation only in IE at the moment.

Has anybody a suggestion, how this could be improved? I tried a lot of things, as suggested by Google, Stackoverflow etc. but nothing really worked. Or has anybody some experience in automating Protractor Test's using different certificates?

Thank's for the help.

回答1:

Not direct solution but if it is automated build you may use --headless argument:

capabilities: {
  'browserName': 'chrome',
  chromeOptions: {
    args: [ "--headless", "--disable-gpu", "--window-size=800,600" ]
  }
}