如何测试将鼠标悬停在Cucumber中的文本上

时间:2013-12-16 16:06:26

标签: testing selenium cucumber

我正在使用黄瓜测试悬停在表格Header文本的文本上。因为我使用模板我没有表头的标识符所以我不知道如何定位所有标头并将其与所需的值进行比较。

<th>
<a class="className" title="Title for Header1">header1</a>
</th>
<th>
<a class="className" title="Title for Header2">header2</a>
</th>
<th>
<a class="className" title="Title for Header3">header3</a>
</th>

1 个答案:

答案 0 :(得分:1)

发现的问题是:您需要验证每个title的{​​{1}}属性

这是一些关于如何完成任务的伪代码。 (在java中)

<th><a>