How to locate the dynamic input fields and pass values in protractor
<p>Please some one help me to locate the dynamic elements and send the values to that elements using protractor.
Here is my purchaseInfo.html code snippet, where input fields are dynamically loading on the page:</p>

<pre><code>&lt;div class="row subpage-submit-flow"&gt;
  &lt;div class="col-md-12"&gt;
    &lt;!-- progress bar --&gt;
    &lt;uib-progressbar value="45" class="in-progress"&gt;&lt;/uib-progressbar&gt;
    &lt;!-- end progress bar --&gt;
    &lt;div class="page-header"&gt;
      &lt;h2 id="purchaseInfo-header" translate="content.PURCHASE_INFO_HEADER"&gt;&lt;/h2&gt;
      &lt;p id="purchaseInfo-reqFieldLbl" translate="content.PURCHASE_INFO_REQUIRED_FIELD_LABEL"&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-12"&gt;
        &lt;p ng-show="purchaseInfo.$invalid" class="error-message pull-right"&gt;
          *Please complete all required fields.
        &lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="clearfix"&gt;&lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div ng-class="purchaseInfoCtrl.receiptImage ? 'col-md-6' : 'col-md-12'"&gt;
        &lt;form name="purchaseInfo" novalidate&gt;
          &lt;div ng-if="webAttributes" class="row"&gt;
              &lt;div ng-repeat="webAttribute in webAttributes track by $index"&gt;
                &lt;div class="clearfix" ng-if="$index % 2 == 0"&gt;&lt;/div&gt;
                 &lt;div ng-class="purchaseInfoCtrl.receiptImage ? 'col-md-12' : 'col-md-6'"&gt;
                    &lt;div ng-if="purchaseInfoCtrl.isTextField(webAttribute) || purchaseInfoCtrl.isCurrencyField(webAttribute)"
                        class="form-group"&gt;
                      &lt;p class="noMargin"
                          ng-show="purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$viewValue || webAttribute.focused"
                          ng-class="(purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$invalid &amp;&amp; purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$dirty) ? 'input-error-label' : (webAttribute.focused) ? 'activeFieldLabel' : 'inactiveFieldLabel'"&gt;
                        &lt;span&gt;{{ webAttribute.displayValue }}&lt;/span&gt;
                      &lt;/p&gt;
                      &lt;input id="{{ webAttribute.name }}" border-color ng-if= "webAttribute.webAttributeType == 'C'" ng-focus="purchaseInfoCtrl.focus($event)"
                          ng-blur="purchaseInfoCtrl.blur($event)"
                          ng-class="purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$dirty &amp;&amp; purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$invalid ? 'input-error' : ''"
                          class="noBorderTextBox" type="text" class="form-control noBorderTextBox" name="{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}"
                          ng-model="purchaseInfoCtrl.model.attributes[webAttribute.webAttributeIndex].value"
                          placeholder="{{ webAttribute.displayValue }}"
                          ng-required="webAttribute.mandatory"
                          ng-pattern="/^[^&lt;%&gt;\\\\]+$/"&gt;
                      &lt;input id="{{ webAttribute.name }}" border-color ng-if= "webAttribute.webAttributeType == 'P'" ng-focus="purchaseInfoCtrl.focus($event)"
                           ng-blur="purchaseInfoCtrl.blur($event)"
                           ng-class="purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$dirty &amp;&amp; purchaseInfo.{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}.$invalid ? 'input-error' : ''"
                           class="noBorderTextBox" type="text" class="form-control noBorderTextBox" name="{{webAttribute.webAttributeType}}{{webAttribute.webAttributeIndex}}"
                           ng-model="purchaseInfoCtrl.model.product.attributes[webAttribute.webAttributeIndex].value"
                           placeholder="{{ webAttribute.displayValue }}"
                           ng-required="webAttribute.mandatory"
                           ng-pattern="/^[^&lt;%&gt;\\\\]+$/"&gt;
                    &lt;/div&gt;
</code></pre>

<p>I am following page object pattern and in my purchaseInfo-pageObject.js class, i have written this below function and calling this from the purchaseInfo_spec.j. Surprisingly, sendKeys is not working but dispalyed&amp;sendvalues is getting printed in the console.Please help me. I will appreciate it. Thanks in advance.</p>

<pre><code>this.inputFieldsAll = function (){
this.inputElems = element.all(by.repeater('webAttribute in webAttributes track by $index')).get(1);
if (this.inputElems.isDisplayed()){
 this.inputElems.sendKeys('764763688888');
 console.log('dispalyed&amp;sendvalues');
}
this.inputElems.getText().then(function(val){
  console.log('value: ',val);
});
</code></pre>