Whenever I click the "Update" button on my web application, an alert with a success message pops up. However, Protractor seems to be unable to locate it in the code.
<div class="toast ng-scope toast-success" ng-mouseout="restartTimer(toaster)" ng-mouseover="stopTimer(toaster)" ng-click="click(toaster)" ng-class="toaster.type" ng-repeat="toaster in toasters" style="">
<!-- ngIf: toaster.showCloseButton -->
<div class="ng-binding toast-title" ng-class="config.title"/>
<div class="toast-message" on="toaster.bodyOutputType" ng-switch="" ng-class="config.message">
<!-- ngSwitchWhen: trustedHtml -->
<!-- ngSwitchWhen: template -->
<!-- ngSwitchWhen: templateWithData -->
<!-- ngSwitchWhen: directive -->
<!-- ngSwitchDefault: -->
<div class="ng-binding ng-scope" ng-switch-default="">The update process was completed successfully</div>
<!-- end ngSwitchWhen: -->
</div>
</div>
<!-- end ngRepeat: toaster in toasters -->
</div>
Therefore, the issue lies in Protractor not being able to find the specific element:
<div class="ng-binding ng-scope" ng-switch-default="">The application record has been successfully updated</div>
What could possibly be causing this problem?
I am using the following locator:
element.all(by.repeater('toaster in toasters'))