How to use Page Object pattern with Cucumber and Webrat / Selenium?
- by Will Sargent
I'm looking at a cucumber test suite that is somewhat brittle right now; many small steps, and no knowledge of the page itself.
I'd like to factor out the logic involved in the step definitions inside a series of Selenium PageObjects. As seen here.
However, because I'm using Webrat and not Selenium, everything has to go through the Webrat model. So I cannot do
class MyPage < Selenium::WebPage
end
because that adds a direct dependency.
So I have to route everything through Webrat while still maintaining the Selenium Page object goodness. No documentation on this that I can see: if someone has anything on Webrat + PageModel I'd love to see it.