我将以下代码作为测试的一部分:
if page.text.include? "Provide your details"
go_and_enter_details
end
网页上有多个标有的元素h2
,包括正在检查内容的元素。
返回此错误:
Ambiguous match, found 3 elements matching css "h2" (Capybara::Ambiguous)
如何获得Ruby / Cucumber / Capybara来识别页面是否包含我需要检查的文本?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句