I'm working in a cucumber-ruby framework and we're using Capybara and SitePrism to drive the browser.
I've got a situation where I want to retry a bunch of steps if an error happens, so I was putting a method with logic to cover this within a SitePrism page as follows:
steps %Q{
When I click on the back button
And I enter my reference number
Then I am able to complete the action successfully
}
The problem I'm finding is that when this part of code is reached, the execution fails with:
undefined method `steps' for #<MySitePrismPage:0x000000063be5b0 @loaded=false> (NoMethodError)
Any idea if there's a way for me to use steps within SitePrism pages?
Thanks!