我正在使用 cucumber-ruby 框架,我们正在使用 Capybara 和 SitePrism 来驱动浏览器。
我有一种情况,如果发生错误,我想重试一系列步骤,所以我在 SitePrism 页面中放置了一个带有逻辑的方法,如下所示:
steps %Q{
When I click on the back button
And I enter my reference number
Then I am able to complete the action successfully
}
我发现的问题是,当达到这部分代码时,执行失败:
undefined method `steps' for #<MySitePrismPage:0x000000063be5b0 @loaded=false> (NoMethodError)
知道我是否可以在 SitePrism 页面中使用步骤?
谢谢!