[QA] Reg::Page Objects

jagori samajdar jagori79 at gmail.com
Mon May 19 13:31:27 UTC 2014


Hi,

I had been working on a small feature for Visual Editor :Long external
target links being shortened
Bug-63104

I had certain queries related to the page objects definition.
Certain elements like span which have been defined as below in
visualeditor_page.rb

span(:linksuggestion, text: "http://www.example.com")
same for:
span(:newpage_linksuggestion, text: "DoesNotExist")

I was wondering if suppose I want to reuse these elements ,would I have to
define a separate element since identification is by text and changing text
might cause the other existing tests to fail.

But wouldn't adding another element lead to redundancy.

Also,would identifying the element by xpath help instead of by text?
probably then we could reuse the element.

I know css identification is not supported for certain types but I checked
the documentation on cheezy/pageobjects.

xpath seemed to be supported.

I was wondering if there is a workaround for this or is it advisable to add
a separate element for my test and identifying by text.

Thanks,
Jagori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140519/fae91a84/attachment.html>


More information about the QA mailing list