【发布时间】:2026-02-10 15:20:04
【问题描述】:
我希望这里的社区可以帮助我。我被一个测试用例困住了,一个相当简单的输入。 问题是在网页上,我有两个需要填充的输入字段。两者的 CSS 相似。唯一的例外是选项卡索引值。
<input type="text" class=“text-dropdown-input-field " ag-class="getInputClass()" ag-keydown="inputKey($event, true, true, false, true)" tabindex="100">
<input type="text" class=“text-dropdown-input-field" ag-class="getInputClass()" ag-keydown="inputKey($event, true, true, false, true)" tabindex="120">
我在机器人文件中使用它。
input text tabindex:100 ${val1}
input text tabindex:120 ${val2}
我失败了:
消息:找不到定位器“tabindex:100”的元素。
还有其他选择吗?
谢谢。
【问题讨论】:
-
既然
tabindex是一个属性,你试过//input[@tabindex='100']吗? -
谢谢。这似乎可以解决问题!再次非常感谢。