Protractor: How to enter values when Element is not visible coz of Ng-hide

Ad

My code before clicking on the element is this:

<span ng-show="!Samples" class="u-pl- ng-binding" style="">898<span class="pull-right edit-icon"><i class="Samples2"></i></span></span>

When I click is this:

<span ng-show="!Samples" class="u-pl- ng-binding ng-hide" style="">898<span class="pull-right edit-icon"><i class="Samples2"></i></span></span>

as a result of this, when I click and then try to enter the values, element is not visible or IsDisplayed returns false. However, I cannot enter without clicking on it. So basically the issue is on clicking, the class value to changes to ng-hide and then I am unable to enter the values since the element is not visible.

Any ideas?

Ad

Answer

Ad

I'm pretty sure where is an another element (most likely an input) becoming visible at the moment you click this element and it is becoming hidden. Locate this visible element and enter values into it.

Ad
source: stackoverflow.com
Ad