我在页面中有一个需要用 Cucumber 和 Capybara 进行测试的 iframe 没有 class 或 id 属性,但它是 DOM 上唯一的 iframe。我怎样才能使用within_frame
水豚方法?
use find
获取元素并将其传递给within_frame
method.
iframe = find('iframe')
within_frame(iframe) do
# expect something here
end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)