Reputation:
I need to write some automated tests for our AngularJS apps with Protractor. Currently I am facing two problems:
before the page is fully rendered some calls to services are made that require user name and password. These are prompted with a basic auth popup. I am not able to get my hands on this popup as all attempts to get the window handles fail. (or more explicit: the callback for the promise is never executed)
for a different case I am getting the "select certificate" popup which I am also unable to get my hands on.
For both cases I have now the question if I am even able to ever capture them somehow or is it just that these are not accessible via automated tests via WebDriver? Currently I am trying to test the app with Chrome and PhantomJS but I would prefer to have them running with PhantomJS for an easier integration to our build environment.
Upvotes: 1
Views: 2183
Reputation: 9
There is a possibility to automatically select the certificate with Chrome. Just have a look at the documentation: http://www.chromium.org/administrators/policy-list-3#AutoSelectCertificateForUrls
Upvotes: 1
Reputation: 2560
I had the problem and when such security pop-up occurs I couldn't handle them with WebDriver. PhantomJS of course is even worse in such case.
You have 2 or 3 options here :
Upvotes: 0