任何人都可以提出在水豚页面上寻找斜体的最佳方法。我有一项功能测试,可以在页面内搜索特定的文本。本文以斜体显示,也与页面上其他所有内容不同。我认为寻找斜体将优于搜索颜色值,但我不确定如何做。用水豚测试斜体
<div class="text-control">
<p class="body">Test text is here and then<i>italics</i> are there</p>
</div>
的功能测试如下记载:
Then(/^the word should be highlighted in the example sentence$/) do
end