【发布时间】:2019-10-17 11:52:58
【问题描述】:
在我看来,我有:
<span class = "info">
<span id="<%= account.id %>" data-account_id="<%= account.id %>" data-activated="<%= account.starts_at? %>">
<%= t(".account_activated") %>
</span>
</span>
如果里面显示“帐户已激活”文本,最好的测试方法是什么(使用水豚进行系统测试)?
我试过了:
assert_selector "span##{acount.id}", text: "account has been activated"
但是得到 Selenium::WebDriver::Error::InvalidSelectorError: 无效选择器:指定了无效或非法的选择器
【问题讨论】: