如何使用selenium ide验证第一行中元素的类?

时间:2015-04-11 21:35:14

标签: selenium ui-testing

如果我有一个具有以下结构的表,如何使用selenium IDE验证第一个i-frame是否具有“fa-star”类?

<thead></thead>
<tbody>

<tr class="odd" role="row">
    <td class="text-center noteworthy-select sorting_1">
        <i class="fa fa-star"></i>
    </td>

1 个答案:

答案 0 :(得分:0)

您应该能够使用assertAttribute命令验证属性的值。

xpath

assertAttribute| xpath=//tr[@class='odd']/td/i@class|fa fa-start

另请参阅this解释

类似的测试用例

enter image description here