【发布时间】:2019-06-25 19:41:38
【问题描述】:
我希望能够简单可靠地选择这两个警报按钮,以便使用量角器进行 e2e 测试。
我不能使用 by.partialButtonText,因为文本在 span 元素内。
<button type="button" class="alert-button ion-focusable ion-activatable sc-ion-alert-md" tabindex="0">
<span class="alert-button-inner sc-ion-alert-md">Yes</span>
<ion-ripple-effect class="sc-ion-alert-md md hydrated" role="presentation"></ion-ripple-effect>
</button>
<button type="button" class="alert-button ion-focusable ion-activatable sc-ion-alert-md" tabindex="0">
<span class="alert-button-inner sc-ion-alert-md">No</span>
<ion-ripple-effect class="sc-ion-alert-md md hydrated" role="presentation"></ion-ripple-effect>
</button>
【问题讨论】:
标签: protractor ionic4 end-to-end