Reputation: 15
We are at odds in the office over what is the better way to structure our cucumber test suite. This is in the context of clicking radio buttons in forms. The two approaches are:
Option 1:
Pros:
Option 2:
Pros:
In my opinion, option 2 might be better for the short term but as we develop more and scale up, having webElements defined in classes will be more beneficial. And I'm also thinking that development using option 2 is actually going to be clunkier since you need to find the selector each time you use it.
We both think that the other is objectively worse but can't come to an agreement. Is either one objectively better? Which is better practice from an industry standard point of view?
Upvotes: 0
Views: 33
Reputation: 514
I'd choose page objects instead of selectors in the feature files without a second thought because feature files and page object should represent different levels of abstraction. Page objects can of course share common functionality any way you see fit to reduce bloat.
Upvotes: 1