How to use Page Object pattern with Cucumber and Webrat / Selenium?
Posted
by Will Sargent
on Stack Overflow
See other posts from Stack Overflow
or by Will Sargent
Published on 2010-04-05T22:36:39Z
Indexed on
2010/04/19
11:23 UTC
Read the original article
Hit count: 429
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.
© Stack Overflow or respective owner