[QA] better page object explanation, colon confusion

Chris McMahon cmcmahon at wikimedia.org
Mon Oct 27 14:50:30 UTC 2014


On Fri, Oct 24, 2014 at 9:37 PM, S Page <spage at wikimedia.org> wrote:

>
> E.g. https://github.com/cheezy/page-object/wiki/Elements has
>
>   button(:your_name, :id => 'an_id')
>
> but our features/support/foo_page.rb files have e.g.
>
>   h1(:first_heading, id: "firstHeading")
>
> is this Ruby strangeness, or just supporting alternative syntaxes?
>

I'll defer to Dan or Zeljko (or Google) for a full CSish explanation...
These statements accomplish the same thing, but  the "=>" is an older
syntax and the second way is preferred today.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20141027/6322f51f/attachment.html>


More information about the QA mailing list