【发布时间】:2018-04-18 18:25:35
【问题描述】:
我正在编写一个黄瓜测试,我想在其中获取元素中的 HTML。
例如:
within 'table' do
# this works
find('//tr[2]//td[7]').text.should == "these are the comments"
# I want something like this (there is no "html" method)
find('//tr[2]//td[7]').html.should == "these are the <b>comments</b>"
end
有人知道怎么做吗?
【问题讨论】: