gpt4 book ai didi

javascript - 在 testcafe 的跨度内搜索跨度

转载 作者:行者123 更新时间:2023-12-04 00:00:48 24 4
gpt4 key购买 nike

<mat-option class="select-bank-option mat-option ng-star-inserted mat-selected mat-active" role="option" data-cy="selectDKCAD" tabindex="0" id="mat-option-261" aria-disabled="false" aria-selected="true"><!---->
<span class="mat-option-text"><!----><img class="margin-right-10 ng-star-inserted" height="14px" src="/public/images/flags/dk.svg">
<span>CAD - DnB - Bank DK CAD - 96321234567896</span><!----></span>
<div class="mat-option-ripple mat-ripple" mat-ripple=""></div>
</mat-option>

我正在尝试根据它的名称选择跨度。

我正在尝试单击由 angular 生成的下拉菜单,其中包含文本“CAD - DnB - Bank DK CAD - 96321234567896”

我试过:

    .click(Selector('mat-option-text').with(bank))

.click(Selector('span').with(bank))

其中 'bank' 是方法的参数,在这两种情况下,它都无法在下拉菜单中找到该选项。

最佳答案

您似乎正在尝试使用 Selector 基于 class="mat-option-text" 进行查询来自 testcafe。我认为您的 Selector 中缺少 .

试试 Selector('.mat-option-text')

关于javascript - 在 testcafe 的跨度内搜索跨度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57548968/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com