dimanche 25 août 2019

sending input in ion-textarea via protractor - ionic 4

While writing end to end tests for ionic 4 application, I'm sending input to ion-input (which is working fine) in this way:

HTML

<ion-item>
  <ion-label position="floating"> Title : </ion-label>
  <ion-input [readonly]="showAdMode" type="text" name="titleField"
      [(ngModel)]="currentAd.title">
  </ion-input>
</ion-item>
<ion-item>
   <ion-label position="stacked" > Description : </ion-label>
   <ion-textarea [readonly]="showAdMode" name="descriptionField"  
         [(ngModel)]="currentAd.description">
   </ion-textarea>
</ion-item>

-spec.ts

element(by.css('ion-input[name="titleField"] input')).sendKeys('this is a title')

But I'm unable to send input to the ion-textarea in the same way or any other that I've tried. Any assistance will highly be appreciated.

Aucun commentaire:

Enregistrer un commentaire