[QA] Page Object design pattern: where to put element identifiers/selectors

Chris McMahon cmcmahon at wikimedia.org
Fri Mar 21 17:26:12 UTC 2014


On Fri, Mar 21, 2014 at 2:56 AM, Ċ½eljko Filipin <zfilipin at wikimedia.org>wrote:

> On Thu, Mar 20, 2014 at 11:54 PM, Chris McMahon <cmcmahon at wikimedia.org>wrote:
>
>> Adhere to the Page Object design pattern:  keep your page element
>> identifiers in the /support/pages/*page.rb files ONLY, and NOT in the
>> /step_definitions/*steps.rb files.
>>
>
> Is there a reason for this e-mail? Did you find a lot of violations of the
> pattern in the code? Since the e-mail message was sent to both QA and
> mobile mailing lists, my guess is that you have noticed a problem
> in MobileFrontend[1] repository. :)
>
> I am not asking because I want to blame a person or a team, I think fixing
> such problems is a great first contribution for a new volunteer, and I am
> always looking for those.
>

Right, exactly.  I spent some time yesterday getting a few more MF tests to
pass in Chrome and ran into several places where there are element locators
in steps. Some are old, some are new.  You can find them in these files in
the MobileFrontend/tests/browser/features/step_definitions directory:

editor_ve_steps.rb
geonotahack_steps.rb
language_steps.rb
mainmenu_steps.rb
nearby_steps.rb

I hope to make improvements to some of these, but refactorers are welcome.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140321/2f7553fd/attachment.html>


More information about the QA mailing list