亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用定位器找不到任何元素:作者(部分鏈接文本,Solid Community)

使用定位器找不到任何元素:作者(部分鏈接文本,Solid Community)

米琪卡哇伊 2021-04-26 15:10:03
我正在嘗試執行一個Cucumber測試,該測試可以單擊ng-select組件(下拉菜單),然后單擊該菜單的選項之一。我嘗試使用“ element(by.partialLinkText('Solid Community'))。click()”,其中“ Solid Community”是必須單擊的文本。我也嘗試過“ by.LinkedText”,但是沒有用。我不能使用“ by.id”或類似的名稱,因為菜單的選項沒有ID(整個下拉菜單都有一個ID)。這是代碼的一些相關部分:login.component.html:... <div style="margin-top: 10px;">    <ng-select class="login-select"               id="login-select-menu"               bindLabel="name"               bindValue="loginUrl"               placeholder="Select ID Provider"               dropdownPosition="bottom"               [items]="identityProviders"               [(ngModel)]="selectedProviderUrl"               style="width: 360px; height: 48px; margin-left: auto; margin-right: auto;">      <!-- DROPDOWN TEMPLATE -->      <ng-template ng-option-tmp let-item="item">        <div style="height:40px; padding-top:10px; position: relative;">          <img [src]="item.image" style="float: left; height: 32px; width: 32px; margin-top:-5px;" />          <span style="float: left; margin-left: 10px;">{{ item.name }}</span>          <div style="clear: both;"></div>        </div>      </ng-template>    </ng-select>    <input type="text"           class="wide-text"           *ngIf="selectedProviderUrl===null"           placeholder="Enter WebID"           style="margin-top:10px; padding: 12px 10px; width: 340px; height: 16px; display: block; margin-left: auto; margin-right: auto;"           [(ngModel)]="customProviderUrl" />    <button class="wide-button" (click)="onLogin()" *ngIf="selectedProviderUrl !== undefined || customProviderUrl !== undefined" [disabled]="selectedProviderUrl===null && !customProviderUrl" style="margin-top:10px;">Go</button>  </div>...
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 171 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號