使用页面对象 gem 时出现嵌套 table 迭代错误

nested table iteration error when using page-object gem

我正在尝试使用 PageObject gem 并停留在 table 迭代。 这是我的:

HTML

<table id='list'>
  <tbody>
    <tr class='somename'>
      <td><a id='someid'><u>Edit</u></a></td>
    </tr>
    <tr class='somename'>
      <td><a id='someid'><u>Edit</u></a></td>
    </tr>
  </tbody>
</table>

PAGE_CLASS

table(:my_table, id: 'list')

步骤

@current_page.my_table_element.each do |row|
  puts row.link_element(text: 'Edit')
end

错误

Watir::Exception::UnknownObjectException: timed out after 30 seconds, waiting for {:id=>"list", :tag_name=>"table"} --> {:index=>0, :tag_name=>"tr"} --> {:text=>"Edit", :tag_name=>"a"} to be located

我看到它没有传递 tbody 标签。知道如何让它发挥作用吗?

等待时间为我解决了这个问题。