I'm fairly new to Protractor and am having some difficulty in obtaining the text from an error box that displays only when a certain condition is met.
I am sure that it is just a syntax issue. Below is the line I am using to attempt to get the "text" that displays in the box, and compare it to a preset static string.
Message: Expected null to equal 'User with login firstname.lastname@example.org' already exists.'
<div ng-class="config.message" ng-switch="" on="toaster.bodyOutputType" class="toast-message"><div ng-switch-default="" class="ng-binding">User with login 'email@example.com' already exists.</div></div>
It looks like your message is not an attribute, but the text for the div. Try: