2016-05-10 7 views
0

私はアプリを分度器でテストしています。私はそのリストの3番目のボタンをクリックするのに必要な同じクラスのリストを持っています。私のE2Eでリストのn番目の項目をクリックしてください。e2e

<ion-content class="List"> 

    <button dark class="listItems" ion-item detail-none *ngFor="#order of orderList" (click)="orderSelected(order)"> 
     {{order.documentNo}}<br><br> 
     {{order.rwsCustomer$_identifier}} 
     <span item-right class="Rs"> 
      Rs {{order.grandTotalAmount}} 
     </span> 
     <span item-right> 
      <ion-icon name="arrow-forward"></ion-icon> 
     </span> 
    </button> 

</ion-content> 

、私はこのように書いている:

it('should go 3nd order detail page',() => { 
     element.all(by.css('.listItems').get(2)).click(); 
    }); 

を、私はこのような私の端末でERRを得る:

e2e.ts (39,37): Property 'get' does not exist on type 'Locator'. (2339) 

答えて

0

あなたはロケータへget関数を適用しています。コードを更新してください:

it('should go 3nd order detail page',() => { 
    element.all(by.css('.listItems')).get(2).click(); 
}); 
関連する問題