I'm trying to read the text from a label that changes according to certain conditions (eg. if you enter a Username already in use, the label will display "Username already in use").
I've been trying to read in the text from the label that gets displayed, but nothing I've tried has worked so far.
The HTML looks like this:
<div class="margin-top-10">
<span ng-show="sentValidation">
<span id="test1" ng-show="userNameAvailable" class="txt-color-green">
<i class="fa fa-check fa-lg"></i>Username available
</span>
<span id="test2" ng-show="!userNameAvailable && userNameAvailable != null" class="txt-color-red">
<i class="fa fa-exclamation-circle"></i>Username unavailable
</span>
</span>
<div class="txt-color-red" ng-show="form.cUsername.$dirty && form.cUsername.$invalid">
<p id="test3" ng-show="form.cUsername.$error.required">
<i class="fa fa-exclamation-circle"></i>Username is required
</p>
<p id="test4" class="txt-color-red" ng-show="form.cUsername.$error.maxlength">
<i class="fa fa-exclamation-circle"></i>Maxmium length is 50 characters
</p>
<p id="test5" class="txt-color-red" ng-show="form.cUsername.$error.minlength">
<i class="fa fa-exclamation-circle"></i>Minimum length is 4 characters
</p>
</div>
</div>
Does anyone know how I can read what gets displayed on the screen?