Reputation: 257
This is how my Html source looks like
<div class="pam-tile-left">
<div pam-icon="lock-closed input"></div>
</div>
<div class="pam-tile-content">
<gfp-form-password-field class="ng-pristine ng-untouched ng-isolate-scope ng-invalid ng-invalid-required" placeholder="Password" validate="true" required="true" ng-model="password">
<input class="ng-pristine ng-invalid ng-invalid-required ng-touched" type="password" ng-show="!showPassword" ng-model="ngModel" ng-disabled="disabled" required="true" placeholder="Password" name="password" data-validate="true">
<input class="ng-pristine ng-untouched ng-invalid ng-invalid-required ng-hide" type="text" ng-show="showPassword" ng-model="ngModel" ng-disabled="disabled" required="true" placeholder="Password" data-validate="true">
<a data-ng-click="toggleShowPassword(!showPassword)" href="javascript:void(0)">
<div ng-attr-pam-icon=" {{ showPassword ? 'password-hide' : 'password-show' }}" pam-icon="password-show"></div>
</a>
</gfp-form-password-field>
I cannot find a password field to click and enter value, I used element(by.css('.ng-untouched')) but then it doesn't find it as it hasnt been touched, please do help.
Upvotes: 2
Views: 761
Reputation: 257
Talked to dev and added a main parent tag to the query. It was there from start and reason for multiple elements is that we are using same element in two places on same page but in different main parent tag.
this is how my new query looks like - this.rootElement.$('gfp-form-password-field input[name="password"]');
Upvotes: 0